Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AesAeadKey"/> class.
 /// </summary>
 public AesAeadKey()
 {
     Mode     = AesMode.Gcm; //Default Mode
     IVLength = 12;
 }
Example #2
0
 public static byte[] GenerateKeyHash(byte[] keyBytes, int ivLength, AesMode mode)
 {
     return(Utility.UnofficalHashKey(KeyczarConst.KeyHashLength, Utility.GetBytes(keyBytes.Length),
                                     mode.ToBytes(), Utility.GetBytes(ivLength), keyBytes));
 }