エラー現象:FATAL_ERROR|System.SecurityException: pad block corrupted
暗号化クラス:
Blob cryptoKey = Crypto.generateAesKey(256);
Blob dataenc = blob.valueOf('Hello');
Blob encryptedData = Crypto.encryptWithManagedIV('AES256', cryptoKey , dataenc );
String b64Data = EncodingUtil.base64Encode(encryptedData);
System.debug('Encrypted' + b64Data);
復号化クラス:
Blob cryptoKey1 = Crypto.generateAesKey(256);
Blob data = EncodingUtil.base64Decode(b64Data);
Blob decryptedData = Crypto.decryptWithManagedIV('AES256', cryptoKey1 , data);
System.debug('Decrypted'+ decryptedData.toString());
暗号化クラス:
Blob cryptoKey = Crypto.generateAesKey(256);
Blob dataenc = blob.valueOf('Hello');
Blob encryptedData = Crypto.encryptWithManagedIV('AES256', cryptoKey , dataenc );
String b64Data = EncodingUtil.base64Encode(encryptedData);
System.debug('Encrypted' + b64Data);
復号化クラス:
Blob data = EncodingUtil.base64Decode(b64Data);
Blob decryptedData = Crypto.decryptWithManagedIV('AES256', 暗号化クラスのcryptoKey , data);
System.debug('Decrypted'+ decryptedData.toString());