‎2010 Jul 12 9:19 PM
Hi Guys,
Here is my problem. I have to create a bank's document encrypted to send to a legacy system. ( Using a KEY to validate the roll process)
I'm thinking to use two scenarios:
1 - Generate the file via ABAP and sent it to a folder in a server to be consuming - SAP ERP.
2 - Generate the file via ABAP, sent it to PI encrypt it via Java Mapping and sent it to a server.
ABAP
First question.
There is a way to generate this file using SHA1 using a Key as parameter?
(CALCULATE_HASH_FOR_CHAR)
Second one.
How can I decrypt this file to test?
Third.
There is others ways to encrypt a file via SAP ERP? UTF-8 and BASE32 are not encrypt codes. They are encoding code.
PI
First
There is a library or other way to encrypt a file without implement a Java Mapping?
Tnks.
‎2010 Jul 13 12:11 AM
have your tried global class CL_HARD_WIRED_ENCRYPTOR? (was700)
‎2010 Jul 13 9:22 AM
Hello friend,
You can refer to code below.
DATA if_encrypt TYPE REF TO cl_hard_wired_encryptor.
CREATE OBJECT if_encrypt.
* ENCRYPTOR the string
TRY.
CALL METHOD if_encrypt->encrypt_string2string
EXPORTING
the_string = lv_string_value <---this is a string coming from user---i mean user input this value from the screen
receiving
RESULT = lv_encypt_value <----this one i declared as string as well...
.
CATCH cx_encrypt_error .
ENDTRY.
*for decryption--- put this code under your decrypt button
*since they are two different action methods that is why i needed to create the instance again.
DATA if_encrypt TYPE REF TO cl_hard_wired_encryptor.
CREATE OBJECT if_encrypt.
TRY.
CALL METHOD if_encrypt->decrypt_string2string
EXPORTING
the_string = lv_encypt_value <---declared as string, as above
receiving
RESULT = lv_decrypt_value <---declared as string as well
.
CATCH cx_encrypt_error .
ENDTRY.
‎2010 Jul 13 2:16 PM
Tnks guys...
But I would like to know if are these methods algorithms as DES, AES, RSA... or others ?
Using these methods I can not export a KEY as a value to combine the string, is there other way to do that?
best regards.
‎2010 Jul 13 2:15 PM
Tnks guys...
Edited by: Douglas Yuri Silveira on Jul 13, 2010 10:19 AM
‎2010 Jul 13 5:27 PM
> There is a way to generate this file using SHA1 using a Key as parameter?
Why don't you simple search the forum with "SHA1" term, you'd get the answer in an instant
> How can I decrypt this file to test?
> There is others ways to encrypt a file via SAP ERP? UTF-8 and BASE32 are not encrypt codes. They are encoding code.
What encryption do you need?
> But I would like to know if are these methods algorithms as DES, AES, RSA... or others ?
Couldn't you say it at the beginning!
By simply looking at CL_HARD_WIRED_ENCRYPTOR methods, we see that the encryption mechanism is very simple (I'm not expert so I can't tell what it is), I wouldn't rely on it...
I recommend you to read [Note 662340 - SSF Encryption Using the SAPCryptolib|http://service.sap.com/sap/support/notes/662340]. There are also some documentation, security guides on sap library and sap marketplace.
Edited by: Sandra Rossi on Jul 13, 2010 6:51 PM
‎2010 Jul 21 1:56 PM
After metting,
We decided to create a ZIP file with password.
So I implemented a application that generate a .bat file that receive as parameters the file, name of zip file and password.
Tnks guys.
Edited by: Douglas Yuri Silveira on Jul 21, 2010 9:58 AM
‎2010 Jul 21 1:58 PM
‎2014 Sep 25 8:54 AM
Hi Douglas,
From the above post, you managed to create ZIP file with password. How you managed to do it? Please let me know the steps.
Thank you. Kishore