/// <summary> /// 字节替换 /// </summary> public void Swap_S() { AES_Data_0 = AES_Table.Swap_S(AES_Data_0); AES_Data_1 = AES_Table.Swap_S(AES_Data_1); AES_Data_2 = AES_Table.Swap_S(AES_Data_2); AES_Data_3 = AES_Table.Swap_S(AES_Data_3); }
/// <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]); }