Probably, keys should be loaded some other way, but no ideas how. For now(and it is wrong I think) loading in such way: string base64_decode(string encoded) { string decoded;
CryptoPP::Base64Decoder decoder; decoder.Put((CryptoPP::byte*)encoded.data(), encoded.size()); decoder.MessageEnd(); CryptoPP::word64 size = decoder.MaxRetrievable(); if (size && size <= SIZE_MAX) { decoded.resize(size); decoder.Get((CryptoPP::byte*)&decoded[0], decoded.size()); return decoded; } else { return ""; } } string priv_key = base64_decode(priv_key_accepted); CryptoPP::SecByteBlock privKey((const CryptoPP::byte*)priv_key.data(), dh2.StaticPrivateKeyLength()); and then use privKey in Agree method. Is it right to load keys in such way? -- You received this message because you are subscribed to "Crypto++ Users". More information about Crypto++ and this group is available at http://www.cryptopp.com and http://groups.google.com/forum/#!forum/cryptopp-users. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.