|Title: Where can I find more information on A$ENCRYPT and A$DECRYPT?|
Question:Where can I find more information on A$ENCRYPT and A$DECRYPT? I am getting errors involving 'padding' and 'multiple of 8 bytes' when I use these routines.
Answer:The size of the key passed to A$ENCRYPT or A$DECRYPT must be less than or equal to 128-bits (i.e. 16 bytes). For example, use the following data item for your encryption key:
Then, for example, you can take the output from A$ENCRYPT (i.e. encrypted-data) and pass it as the input to A$DECRYPT (i.e. data-to-decrypt) to reverse the encryption.
See the attached sample program, encryption.cbl
Note that the encrypted data is binary and is not an encoded character string.The A$ENCRYPT routine does the equivalent of the following Java code:
The A$DECRYPT routine does the equivalent of the following Java code:
PKCS5Padding is the default padding scheme for Blowfish ciphers.
Detailed information can be found in the Java™ Cryptography Architecture (JCA) Reference Guide here.
|Authored by: Veryant Support on Wed, Jul 21st, 2010 at 7:00 PM
This question has been viewed 8342 times so far.
|Online URL: http://support.veryant.com/support/phpkb/question.php?ID=138|
Powered by PHPKB Knowledge Base Software