Encrypt password from UI and decrypt from Java | Community
Skip to main content
Level 3
April 6, 2023
Solved

Encrypt password from UI and decrypt from Java

  • April 6, 2023
  • 1 reply
  • 2305 views

Hi all,

 

How do we encrypt the password from UI and decrypt in my backend servlet? Are there any OOTB features to do so?

 

Best Regards,

Kiruthiga

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

OOTB, it is possible to encrypt and decrypt at the backend using https://sling.apache.org/documentation/bundles/commons-crypto.html

You can't do that from UI to backend or use public and private key encryption.

 

1 reply

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
April 6, 2023

OOTB, it is possible to encrypt and decrypt at the backend using https://sling.apache.org/documentation/bundles/commons-crypto.html

You can't do that from UI to backend or use public and private key encryption.

 

Arun Patidar
Level 3
April 10, 2023

is there a way to encrypt from UI in the POST request and decrypt the same from backend?

arunpatidar
Community Advisor
Community Advisor
April 10, 2023

You can't do encryption but you can encode and decode using any encoding algo

example : https://www.javatpoint.com/java-base64-encode-decode  

Arun Patidar