Je cherche sans succès la doc sur ces fonctions. Car je n'arrive pas à décrypter la phrase en entier, mon output contient que les 16 premiers caractères.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
bool decryptAES(const char *password, const char *input, char *output, const int bitKey, const int outLength)
{
  AES_KEY key;
 
  memset(output, 0, outLength);
 
  if (bitKey < 128 || bitKey > 256)
    return false;
 
  AES_set_decrypt_key((unsigned char*)password, bitKey, &key);
  AES_decrypt((unsigned char*)input, (unsigned char*)output, &key);
 
  return true;
}