I've been having an issue where decrypted data is left in RAM once I'm done
with it. I've traced the problem to decrypting the data to a std::string.
So I've started to move all my code over to use SecByteBlock.

- I wasn't able to figure out how to create a sink that put the encrypted
data so I patched cryptolib with this:
https://www.cryptopp.com/wiki/Secbyteblocksink
This will come back and haunt me next time I update cryptopp so I was
wondering if there is a better way to do it that I've missed?
    m_encrypter=new DefaultEncryptorWithMAC(blockPwd,blockPwdlen,new
SecByteBlockSink(m_encrypteddata));

- I can't find any examples of decrypting data into a SecByteBlock or other
similar device. std::string has no guarantees of destroying its data
afterwards so decrypted data is leaked out from the program.

(Simplified version of what I'm currently doing butI need to put it into
something other than a string)
string decodedData;
Filter *decrypt=new
StringSource(m_encrypteddata.BytePtr(),m_encrypteddata.size(),true,new
DefaultDecryptorWithMAC(blockPwd,blockPwdlen, new StringSink(decodedData)));

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscr...@googlegroups.com.
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
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.

Reply via email to