public void Dispose() { if (_abAesKey != null) { _Cryptography.GetRandomBytes(_abAesKey); _abAesKey = null; } }
/// <summary>The constructor to initialize a <c>new BackgroundThread</c>.</summary> /// <param name=""></param> public BackgroundThread(EncryptionServices Cryptography = null) { _Cryptography = Cryptography ?? new EncryptionServices(); _quCommand = new ConcurrentQueue <BackgroundMessage>(); _quReturn = new ConcurrentQueue <BackgroundMessage>(); _abAesKey = new byte[EncryptionServices.ciAes256KeyBytesLength]; _Cryptography.GetRandomBytes(_abAesKey); Reset(); }