Amido.SystemEx.IO.EncryptionUtil.GetKeyBytes C# (CSharp) Метод

GetKeyBytes() публичный статический Метод

public static GetKeyBytes ( string passPhrase, string saltValue, int passwordIterations, int keySize ) : byte[]
passPhrase string
saltValue string
passwordIterations int
keySize int
Результат byte[]
        public static byte[] GetKeyBytes(string passPhrase, string saltValue, int passwordIterations, int keySize)
        {
            Args.NotNull(saltValue, "saltValue");
            byte[] saltValueBytes = Encoding.ASCII.GetBytes(saltValue);

            Rfc2898DeriveBytes deriveBytes = new Rfc2898DeriveBytes(passPhrase, saltValueBytes, passwordIterations);
            return deriveBytes.GetBytes(keySize / 8);
        }