Application Development and Automation 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: 
Read only

FM for encryption / decryption

Former Member
0 Likes
3,597

Hi,

can you advice me a any FM for encrypting / decrypting a strings.

Thank you.

Marian

7 REPLIES 7
Read only

athavanraja
Active Contributor
0 Likes
1,407

data: user(50).

data: slen type i ,

key type i value 1303621 .

move: 'abc' to user .

slen = strlen( user ).

call function 'HTTP_SCRAMBLE'

exporting

source = user

sourcelen = slen

key = key

importing

destination = user.

other approach

CL_HTTP_UTILITY=>IF_HTTP_UTILITY~ENCODE_BASE64

CL_HTTP_UTILITY=>IF_HTTP_UTILITY~DECODE_BASE64

check this link for these methods sample usage

Regards

Raja

Read only

0 Likes
1,407

Hi,

try:

- DP_SCRAMBLE_STRING

- SCRAMBLE_STRING

or command

 CALL 'AB_RFC_X_SCRAMBLE_STRING'
    ID 'SOURCE'      FIELD SOURCE
    ID 'KEY'         FIELD KEY
    ID 'SCR'         FIELD 'X'
    ID 'DESTINATION' FIELD TARGET
    ID 'DSTLEN'      FIELD TARGETLEN.

regards Andreas

Read only

0 Likes
1,407

Hi, I do not see how to decrypt the encrypted string if I use DP_SCRAMBLE_STRING or SCRAMBLE_STRING o command

CALL 'AB_RFC_X_SCRAMBLE_STRING'

ID 'SOURCE' FIELD SOURCE

ID 'KEY' FIELD KEY

ID 'SCR' FIELD 'X'

ID 'DESTINATION' FIELD TARGET

ID 'DSTLEN' FIELD TARGETLEN.

regards,

Sergio

Read only

manuel_bassani
Contributor
0 Likes
1,407

Hi Marian,

there is CALCULATE_HASH_FOR_CHAR that calculate some Cryptographic Hash Function (SHA1/MD5).

This function may be helpful for example in encrypting passwords like UNIX does.

I hope this will helps.

Best regards, Manuel

Read only

Former Member
0 Likes
1,407

Hi Marian

You can use

FIEB_PASSWORD_ENCRYPT to encrypt and

FIEB_PASSWORD_DECRYPYT to decrypt

Regards

Naresh

Read only

Former Member
0 Likes
1,407

Hi,

Are you searching for these FMs:

CALL FUNCTION 'FIEB_PASSWORD_ENCRYPT'

CALL FUNCTION 'FIEB_PASSWORD_DECRYPT'

Regards,

Anjali

Read only

0 Likes
1,407

Hi Anjali , unfortunatly that functions belong to FI and are available in any R/3 system but I need something in a standalone ABAP SAP Web AS 6.40 system.

Sergio