Exemplo n.º 1
0
 public void Clear()
 {
     Password.TryClear(clearAfterUse: true);
     Salt.TryClear(clearAfterUse: true);
     InitialVector.TryClear(clearAfterUse: true);
     PasswordIterations = 0;
     KeySize            = 0;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Implements <seealso cref="IDisposable.Dispose()"/>
        /// </summary>
        public void Dispose()
        {
            // Clear data
            try
            {
                Password.TryClear(clearAfterUse: true);
                Salt.TryClear(clearAfterUse: true);
                InitialVector.TryClear(clearAfterUse: true);
                PasswordIterations = 0;
                KeySize            = 0;
            }
            catch (Exception)
            {
                // ignored
            }

            OnDisposing();
        }