Hey everyone, I'm trying to recreate an older juce blowfish encryption to AES using the crypto++ library, I'm struggling (as always) with definging the variables inside classes and constructors, somehow i don't understand it and it's getting really frustrating, I manage to write complex code but this is really a blocking factor to me, if someone posts an answer could you also write some comment on how it works in human language? :) (I've left how the old blowfish code was defined in comments)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
class StringEncryptor: public Encryptingisfun // this used to say :public Blowfish
{
public:
StringEncryptor(const juce::String& strKey)
//: BlowFish ((std::uint8_t *)(strKey.toWideCharPointer()), strKey.length())
:
Encryptingisfun(SecByteBlock key(AES::MAX_KEYLENGTH+AES::BLOCKSIZE), juce::String password("dfc4894de3b6451cef988124b4327e58"), juce::String iv("27c9f38a05e5e422b99e630609e636ac"), HKDF<SHA256> hkdf, hkdf.DeriveKey(key, key.size(), (const byte*)password.data(), password.size(), (const byte*)iv.data(), iv.size(), NULL, 0))
{
}
~StringEncryptor()
{
};