Пример #1
0
 private byte[] SubByte(byte[] newKeyScheduler)
 {
     for (var i = 0; i < newKeyScheduler.Length; i++)
     {
         newKeyScheduler[i] = SBox.Replace(newKeyScheduler[i].ToString("X2"));
     }
     return(newKeyScheduler);
 }
Пример #2
0
 public void SubBytes()
 {
     for (var i = 0; i < 4; i++)
     {
         for (var j = 0; j < 4; j++)
         {
             this.crifredText.matrix[i, j] = SBox.Replace(this.crifredText.matrix[i, j].ToString("X2"));
         }
     }
 }