コード例 #1
0
        /// <summary>
        /// <see cref="IDisposable.Dispose"/>
        /// </summary>
        public override void Dispose()
        {
            base.Dispose();

            if (!(this.aesCcm is null))
            {
                this.aesCcm.Dispose();
                this.aesCcm = null;
            }
        }
コード例 #2
0
 /// <summary>
 /// AES CCM cipher:
 /// http://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38c.pdf
 /// </summary>
 /// <param name="EncKeyLength">Encryption key size.</param>
 /// <param name="FixedIvLength">Fixed IV length.</param>
 /// <param name="TagLength">Tag length.</param>
 public AesCcmCipher(int EncKeyLength, int FixedIvLength, int TagLength)
     : base(0, EncKeyLength, FixedIvLength)
 {
     this.t      = TagLength;
     this.aesCcm = new AesCcm(EncKeyLength * 8, TagLength, 12);
 }