cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

RSA algorithm implementation in ByD

former_member689468
Participant
478

Hello all,

as the title suggests, is there a way to implement RSA algorithm in ABSL ? I would like to encrypt a concatenated string with a private key and save it in an extension field of a standard business object. Is there any way to acomplish this using ABSL ?

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

ThiagoSarmento
Product and Topic Expert
Product and Topic Expert

Hello there Josip,

You may use the Hash reuse library once you import the so called "Platinum Engineering" library on your script file.

Once you add it to your script:

import AP.PlatinumEngineering;

import AP.PlatinumEngineering.Public;

You would have access to Hash.EncryptString() which accepts AES128 encryption.

Please refer to the below blog for more details about the library:

https://blogs.sap.com/2017/09/25/sap-platinum-engineering-libraries/

Just note that these libraries are existing internal functions from SAP so they are not revised by the documentation team yet and they are not released for general uses, hence they cannot be supported via incidents.

BR,

Thiago

former_member689468
Participant

Thank you Thiago,

was not aware of that option, I will look into it in more detail.

Best regards,

J

former_member689468
Participant
0 Kudos

Just one more question, since it is a requirement by law that we use RSA algorithm, is it possible via the platinum engineering library in any way to implement it ? Or any way in general ?

I see that the Hash function does have input parameter named Algorithm, so I tried to put it in plainly like this

var l_encrypted = Hash.EncryptString("RSA","123",l_secret_key);

Unfortunately no luck. Is there the option to use RSA or is it not possible like this ?

Thank you

ThiagoSarmento
Product and Topic Expert
Product and Topic Expert
0 Kudos

Can you please raise an incident to SAP Product Support asking to enable the hash functionality on your tenant? You can mention my name on the incident, I will be enabling it for you then.

cianbarrett
Product and Topic Expert
Product and Topic Expert

Hello Josip,

Only "AES128", "AES192", "AES256" can be used in ABSL. Other algorithms have not been implemented.

Kind regards,

Cian

former_member689468
Participant
0 Kudos

Thank you both for the answers. What would be the "best practice" suggested by SAP to achieve this functionality in ByD ? Does CPI have the option to encrypt a string with RSA algorithm out of the box, could we use a communication arrangement in our ABSL code to communicate with a cloud platform integration instance and have the string encrytpted there then just store the response back as an extension field in our ByD ?

Answers (0)