Skip to Content
0

Encrypt data to RSA SHA-256 algorithm

Jul 29, 2017 at 12:13 AM

293

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

avatar image
Former Member Jul 29, 2017 at 09:10 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jul 29, 2017 at 12:29 AM
0

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-java/

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0
Fabian Lupa Jul 29, 2017 at 04:47 PM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Fabian,

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

0
avatar image
Former Member Aug 18, 2017 at 09:59 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded