-
Notifications
You must be signed in to change notification settings - Fork 5
Encryption
There are AES and Blowfish implementations to provide stronger and faster security. They are are pretty easy-to use and are implemented in a secure way. They can be used synchronously and asynchronously.
ISafeEncryptor
abstracts an encryption operation which is designed to be slower to be more secure.
Use it when you choose more security over performance (for most sensitive data).
AesEncryptor
is the implementation of ISafeEncryptor
. It uses =>
- 256 bit key
- Random IV for each encryption
- Secures the key with with 100 iterations of Pbkdf2 key derivation function.
- Uses PKCS7 padder.
IFastEncryptor
abstracts a secure and faster encryption algorithm.
Use it when the performance is also important as security.
It's implementation,Blowfish
, passes vector tests and can use different cipher modes.
The default CBC
mode uses a random IV while ECB
(not recommended) has no IV protection.
The encryption can be used with none or PKCS7 padding.
Encryption algorithms implement ICryptoTransform
and write a sequence of bytes to the memory stream asynchronously in the cryptostream.