private byte[] GetKey(byte[] salt)
        {
            byte[] key;
            if (entropy == null || entropy.Trim().Length == 0)
            {
                entropy = CryptographyUtility.GetEntropy(keyLength);
            }

            var passBytes = new PasswordDeriveBytes(entropy, salt);

            key = passBytes.GetBytes(keyLength);

            return(key);
        }
 private byte[] GetSalt()
 {
     return(CryptographyUtility.GetRandomBytes(16));
 }