コード例 #1
0
 public         DWord[] ToDWords()
 {
     DWord[] dwordArray = new DWord[this._buffer.Length % 4 == 0 ? this._buffer.Length / 4 : this._buffer.Length / 4 + 1];
     for (int index = 0; index < this._buffer.Length / 4; ++index)
     {
         dwordArray[index] = new DWord(BitConverter.ToUInt32(this._buffer, index * 4));
     }
     return(dwordArray);
 }
コード例 #2
0
 public static  DWord[] Or(DWord[] dws1, DWord[] dws2)
 {
     if (dws1 == null)
     {
         throw new ArgumentNullException(nameof(dws1));
     }
     if (dws2 == null)
     {
         throw new ArgumentNullException(nameof(dws2));
     }
     if (dws1.Length != dws2.Length)
     {
         throw new ArgumentException("dws1's length must equals dws2's length");
     }
     DWord[] dwordArray = new DWord[dws1.Length];
     for (int index = 0; index < dwordArray.Length; ++index)
     {
         dwordArray[index] = dws1[index] | dws2[index];
     }
     return(dwordArray);
 }
コード例 #3
0
 public BlockCipher(DWord left, DWord right)
     : this(new DWord[2] {
     left, right
 })
 {
 }