Esempio n. 1
0
 public void Init(ICipherParameters parameters)
 {
     if (parameters is KeyParameter)
     {
         this.cipher.Init(true, parameters);
         this.L = new byte[this.ZEROES.Length];
         this.cipher.ProcessBlock(this.ZEROES, 0, this.L, 0);
         this.Lu  = CMac.DoubleLu(this.L);
         this.Lu2 = CMac.DoubleLu(this.Lu);
     }
     else if (parameters != null)
     {
         throw new ArgumentException("CMac mode only permits key to be set.", "parameters");
     }
     this.Reset();
 }