Let's say I have the following where k
is any length string
If I do the following
var p = aes256.decrypt(k, 'XXXXXXXXXXXXXXXXXXXXX');
The value of p
will always equal nothing. Can this please be explained in really simple terms?
XXXXXXXXXXXXXXXXXXXXX
being any 22 character string if I do the following where p
is any 5 byte string.
var c = aes256.encrypt(k, p);
Here's some code in Node
var aes256 = require('aes256');
var k = 'THIS IS MY ONE AND ONLY KEY'; // A KEY
var p = 'ABCDE'; // 5 CHARACTER STRING
var e = aes256.encrypt(k, p);
console.log (e);
var decrypted_1 = aes256.decrypt(k, e);
console.log (decrypted_1)
var decrypted_2 = aes256.decrypt(k, 'AAAAAAAAAAAAAAAAAAAAAA');
console.log (decrypted_2)
The value of decrypted_2 is blank - I don't understand why