You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fix is as follows:
// create a buffer
size_t ciphertext_len = ([plaintext length] + kCCBlockSizeAES128 + [iv length]);
// Patch - the output length should be calculated using this iOS function.
// If this line is not included, then 1/16th of strings will fail encryption
// for an incorrect output buffer size kCCBufferTooSmall reported from CCCryptorFinal
ciphertext_len = CCCryptorGetOutputLength(cryptor, ciphertext_len, true);
The text was updated successfully, but these errors were encountered:
The following string lengths do not encrypt: 15, 31, 47, 63, 79, 95, 111, 127, 143, 159, 175, 191, 207, 223, 239, 255, 271, 287, 303, 319, 335, 351, 367, 383, 399, 415, 431, 447, 463, 479, 495, 511, 527, 543, 559, 575, 591, 607, 623, 639, 655, 671, 687, 703, 719, 735, 751, 767, 783, 799, 815, 831, 847, 863, 879, 895, 911, 927, 943, 959, 975, 991, 1007, 1023, etc etc
The fix is as follows:
// create a buffer
size_t ciphertext_len = ([plaintext length] + kCCBlockSizeAES128 + [iv length]);
The text was updated successfully, but these errors were encountered: