/// <summary></summary> public void Dispose() { if (_AesServices != null) { _AesServices.Clear(); _AesServices = null; } if (_MD5Services != null) { _MD5Services.Dispose(); _MD5Services = null; } if (_SHA1Services != null) { _SHA1Services.Dispose(); _SHA1Services = null; } if (_SHA256Services != null) { _SHA256Services.Dispose(); _SHA256Services = null; } if (_SHA384Services != null) { _SHA384Services.Dispose(); _SHA384Services = null; } if (_SHA512Services != null) { _SHA512Services.Dispose(); _SHA512Services = null; } if (_Pkcs11Library != null) { _Pkcs11Library.Dispose(); _Pkcs11Library = null; } if (_Randomness != null) { _Randomness.Dispose(); _Randomness = null; } if (_RsaServices != null) { _RsaServices.Clear(); _RsaServices = null; } }
/// <summary> /// Disposes all unmanaged resources /// </summary> public void Dispose() { if (_encryptor != null) { _encryptor.Dispose(); } if (_decryptor != null) { _decryptor.Dispose(); } if (_aes != null) { _aes.Clear(); } if (_sha1 != null) { _sha1.Clear(); } if (_sha256 != null) { _sha256.Clear(); } }