Esempio n. 1
0
 /// <summary>
 /// 反字节替换
 /// </summary>
 public void Swap_S_T()
 {
     AES_Data_0 = AES_Table.Swap_S_T(AES_Data_0);
     AES_Data_1 = AES_Table.Swap_S_T(AES_Data_1);
     AES_Data_2 = AES_Table.Swap_S_T(AES_Data_2);
     AES_Data_3 = AES_Table.Swap_S_T(AES_Data_3);
 }
Esempio n. 2
0
 /// <summary>
 /// 轮密钥产生 g变换
 /// </summary>
 /// <param name="wParam"></param>
 /// <param name="round"></param>
 /// <returns></returns>
 private WORD G_Conversion(WORD wParam, int round)
 {
     wParam = RoundShiftLeft1Byte(wParam);
     return(AES_Table.Swap_S(wParam) ^ Rcon[round]);
 }