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: 

FM for encryption / decryption

Former Member
0 Kudos

Hi,

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

Thank you.

Marian

7 REPLIES 7

athavanraja
Active Contributor
0 Kudos

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

0 Kudos

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

0 Kudos

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

manuel_bassani
Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Marian

You can use

FIEB_PASSWORD_ENCRYPT to encrypt and

FIEB_PASSWORD_DECRYPYT to decrypt

Regards

Naresh

Former Member
0 Kudos

Hi,

Are you searching for these FMs:

CALL FUNCTION 'FIEB_PASSWORD_ENCRYPT'

CALL FUNCTION 'FIEB_PASSWORD_DECRYPT'

Regards,

Anjali

0 Kudos

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