Hi,
I have a question regarding thread safety of crypto++.
The readme says:
"2. Crypto++ is thread safe at the class level. This means you can
use Crypto++ safely in a multithreaded application, but you must
provide synchronization when multiple threads access a common Crypto++
object."
This is a bit ambiguous to me.
Does this mean that if I have multiple instances(!) of, say, a
blowfish encryptor, that I still need to do locking?
E.g.:
typedef struct { unsigned char iv[8], key[16]; } entry_t;
entry_t pars[10];
// init each pars-entry
CryptoPP::CFB_Mode<CryptoPP::Blowfish>::Encryption *enc[10];
for(int i=0; i<10; i++)
enc[i] = new
CryptoPP::CFB_Mode<CryptoPP::Blowfish>::Encryption(pars[i].key, 16,
pars[i].iv);
Now if thread A wants to use enc[0] and thread B wants to use enc[1],
do they still need locking to be able to do so? (e.g. due to global/static
variables etc in the used classes).
--
You received this message because you are subscribed to the "Crypto++ Users"
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at
http://www.cryptopp.com.