Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Encrypt data to RSA SHA-256 algorithm

Former Member
0 Kudos
4,995

Hi all,

for my current project i need to create a JWT (BASIS 7.02, no OAuth2 function available), so i have to compute the signature using SHA256withRSA (also known as RSASSA-PKCS1-V1_5-SIGN with the SHA-256 hash function).

Please, how can i do that ?

Please note that the CommonCryptoLib v8.5 is installed.

Thanks for any help,

Eric

6 REPLIES 6

Former Member
0 Kudos
783

What have you tried? Are you sure it has to be JWT? If you look through the archives there are several detailed messages on how to step through this, including dealing with some documented bugs.

https://archive.sap.com/discussions/thread/3729755

https://blogs.sap.com/2015/09/08/implementing-sha2-sha256-type-certificate-in-sap-netweaver-70-for-j...

0 Kudos
783

Hi Steven,

yes sure, i need a JWT because i want to connect to Google DFP API and for this i need to setup up an OAuth2 authentication that is not native in my SAP system. So first step is to create a JWT.

For more information you can watch here : Using OAuth 2.0 for Server to Server Applications

Thanks

Former Member
0 Kudos
783

Hi Steven,

yes sure, i need a JWT because i want to connect to Google DFP API and for this i need to setup up an OAuth2 authentication that is not native in my SAP system. So first step is to create a JWT.

For more information you can watch here : Using OAuth 2.0 for Server to Server Applications

Thanks

fabianlupa
Contributor
0 Kudos
783

As an approach: take a look into the /UI2/ packages. They had JSON serialization before it got added to BASIS so maybe there's some OAUTH code too.

0 Kudos
783

Hi Fabian,

sorry but i don't have this package. SAP_BASIS is realease 702 SP-Level 0016, old version 😞

Former Member
0 Kudos
783

I think that method CALCULATE_HMAC_FOR_CHAR from class CL_ABAP_HMAC must be to use for compute, i can test it with algorithm 'SHA256' but with RSA SHA256, how can i do ?

Need help, please.