I am trying to generate a AES 128 Key. If i debug the size of the Key it shows as 16 bytes, however, if i debug the key it shows 24 bytes. I am Using below Code to generate key.
Blob key = Crypto.generateAesKey(128);
System.debug('Key-->'+Encodingutil.base64Encode(key)); //rFc3IlMSCgEIZ4k8VepCKQ==
System.debug('key.Size-->'+key.size()); //16
I need 16 bytes of key. Can anybody suggest.