예제 #1
0
파일: Aead.cs 프로젝트: zer09/miscreant
 /// <summary>
 /// Initializes a new AEAD instance using the AES-CMAC-SIV algorithm.
 /// </summary>
 /// <param name="key">The secret key for AES-CMAC-SIV encryption.</param>
 /// <returns>An AEAD instance.</returns>
 public static Aead CreateAesCmacSiv(byte[] key)
 {
     return(new Aead(AesSiv.CreateAesCmacSiv(key)));
 }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the STREAM encryptor using the AES-CMAC-SIV algorithm.
        /// </summary>
        /// <param name="key">The secret key for encryption.</param>
        /// <param name="nonce">The nonce for encryption.</param>
        /// <returns>A STREAM encryptor instance.</returns>
        public static StreamEncryptor CreateAesCmacSivEncryptor(byte[] key, byte[] nonce)
        {
            var siv = AesSiv.CreateAesCmacSiv(key);

            return(new StreamEncryptor(siv, nonce));
        }