10-12-2015 11:23 AM
I am trying to encrypt a string data using AES 128 method.
in java, I could use
SampleEncryptDecrypt oSed = new SampleEncryptDecrypt();
//byte[] key = oSed.generateKey(128);
String str1 = "1111111111111111"; //sample key
byte[] key = str1.getBytes();
System.out.println("Key:" + new String(key));
byte[] encryptedData = oSed.encryptData("MyText", key);
System.out.println("encryptedData: " + new String(encryptedData));
String decryptedData = oSed.decryptData(key, encryptedData);
System.out.println("decryptedData:" + decryptedData);
the output is something like:
Key:1111111111111111
encryptedData: ¼+\žÉP³…讘JLÏ#Þ
decryptedData: MyText
are there any FMs or class methods in ABAP, that we can use to encrypt using AES 128 algorithm.
I checked in scn, but could not find easy way/sample programs.
thanks
Madhu_1980
10-13-2015 4:33 AM
10-16-2015 9:47 PM
Hello Madhu,
I suggest reading the following documents:
The standard algorithm used by SSF is configured by ssf/ssf_symencr_alg but you also can pass it as parameter to the envelope function module.
Be sure to use a recent SAPCRYPTOLIB patch level, so AES is technically possible.
Regards,
Cris
06-09-2016 3:38 PM
The SSF libray as documented here is only suited to Document handling and doesnt provide direct aes encryption and descrption.
Still look for call
encrypted_text = Encrypt( algorithm, mode, string, key )
AES-GCM ideally but AES-CBM is better than nothing
does any body know how to call this in ABAP ?