示例#1
0
 public void Dispose()
 {
     if (_abAesKey != null)
     {
         _Cryptography.GetRandomBytes(_abAesKey);
         _abAesKey = null;
     }
 }
示例#2
0
 /// <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();
 }