AES加密


int AES_ExpandKey(BYTE key[], int keyLen) {
  int kl = keyLen, ks, Rcon = 1, i, j;
  BYTE temp[4], temp2[4];
  switch (kl) {
    case 16: ks = 16 * (10 + 1); break;
    case 24: ks = 16 * (12 + 1); break;
    case 32: ks = 16 * (14 + 1); break;
    default:
      printf("AES_ExpandKey: Only key lengths of 16, 24 or 32 bytes allowed!");
  }

/*AES的C实现*/


更详细参见:http://www.codedata.com.tw/social-coding/aes/

你可能感兴趣的:(AES加密)