System.Security.Cryptography.Rfc2898DeriveBytes.Reset C# (CSharp) Method

Reset() public method

public Reset ( ) : void
return void
        public override void Reset()
        {
            Initialize();
        }

Usage Example

コード例 #1
0
        /// <summary>
        /// Deviate byte data based on supported types.
        /// </summary>
        /// <param name="data">Data of any encoding type.</param>
        /// <param name="salt">Divination salt.</param>
        /// <param name="length">Divination returned byte size.</param>
        /// <returns>SaltedData</returns>
        public static SaltedData ToKeyDevination(this byte[] data, byte[] salt = null, int length = 32)
        {
            var salting = salt ?? 16.ToRandomBytes();
            var pbkdf2 = new Rfc2898DeriveBytes(data, salting, PBKDF2_ITERATIONS);
            var derived = pbkdf2.GetBytes(length);
            pbkdf2.Reset();

            return new SaltedData() { Salt = salting, Data = derived };
        }
All Usage Examples Of System.Security.Cryptography.Rfc2898DeriveBytes::Reset