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

Rfc2898DeriveBytes() private method

private Rfc2898DeriveBytes ( byte password, byte salt, int iterations ) : System.Diagnostics
password byte
salt byte
iterations int
return System.Diagnostics
        public Rfc2898DeriveBytes(byte[] password, byte[] salt, int iterations)
        {
            if (salt == null)
                throw new ArgumentNullException(nameof(salt));
            if (salt.Length < MinimumSaltSize)
                throw new ArgumentException(SR.Cryptography_PasswordDerivedBytes_FewBytesSalt, nameof(salt));
            if (iterations <= 0)
                throw new ArgumentOutOfRangeException(nameof(iterations), SR.ArgumentOutOfRange_NeedPosNum);
            if (password == null)
                throw new NullReferenceException();  // This "should" be ArgumentNullException but for compat, we throw NullReferenceException.

            _salt = salt.CloneByteArray();
            _iterations = (uint)iterations;
            _password = password.CloneByteArray();
            _hmacSha1 = new HMACSHA1(_password);

            Initialize();
        }

Same methods

Rfc2898DeriveBytes::Rfc2898DeriveBytes ( string password, byte salt ) : System.Diagnostics
Rfc2898DeriveBytes::Rfc2898DeriveBytes ( string password, byte salt, int iterations ) : System.Diagnostics
Rfc2898DeriveBytes::Rfc2898DeriveBytes ( string password, int saltSize ) : System.Diagnostics
Rfc2898DeriveBytes::Rfc2898DeriveBytes ( string password, int saltSize, int iterations ) : System.Diagnostics