cancel
Showing results for 
Search instead for 
Did you mean: 

Encoding password using SHA-1 Algorithm

former_member788380
Discoverer
0 Kudos


Hi All,

We are using Base64 encoding of password for developing one of our application in SAP SRM. The existing code is something like this:

   * Put the XSTRING in Base64
        &1 = cl_http_utility=>ENCODE_X_BASE64( &2 ).

We have a new requirement to replace Base64 and encode the password using SHA-1 Algorithm.

May I know, how can we achieve this.

Thanks & Regards,

Pavan

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Pavan,

You can use this FM CALCULATE_HASH_FOR_CHAR.

The FM has a parameter ALG which specifies the type of hash algorithm to be used. Default value being 'SHA1' , this will do the job for you.

Hope this solves your issue.

Regards,

Karthik Babu