on 01-09-2018 12:30 PM
Hello Experts,
I have a requirement to encrypt single field in the payload with Certificate and private key stored in NWA keystore with SHA256withRSA and encode it base64. I had referred below links
Signature signature = Signature.getInstance("SHA256withRSA"); signature.initSign((PrivateKey) String.getKey(alias, password.toCharArray())); signature.update(plaintext.getBytes("UTF-8"));
byte[] rsa_text= signature.sign();
I'm unable to get it for single field. Can you please provide code snippet for single key.
Regards,
Rajesh
You need public key for encryption. wikipedia
check this below using some randon key
https://blogs.sap.com/2016/01/20/to-encrypt-and-decrypt-a-single-field-in-message-mapping/
check this reply on how to access the keystore.
https://archive.sap.com/discussions/message/16599416#16599416
if you can create key successfully, then you should be able to perform encryption. search you will find code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.