Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new AEAD instance using the AES-PMAC-SIV algorithm.
 /// </summary>
 /// <param name="key">The secret key for AES-PMAC-SIV encryption.</param>
 /// <returns>An AEAD instance.</returns>
 public static Aead CreateAesPmacSiv(byte[] key)
 {
     return(new Aead(AesSiv.CreateAesPmacSiv(key)));
 }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the STREAM encryptor using the AES-PMAC-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 CreateAesPmacSivEncryptor(byte[] key, byte[] nonce)
        {
            var siv = AesSiv.CreateAesPmacSiv(key);

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