java2db

AES Password Encryption in javascript and decryption in java – servlet



Using advanced encryption standard (AES) we can encrypt the client data in UI level and also possible to decrypt the data in the server side to get it’s original values . This mechanism will avoid the plain text data transfer between the client and server via network (in http ) . Hence , we can provide additional security to the web applications .

Basic requirements for password encryption in javascript and decryption in java:

javascript library
AES Password Encryption in javascript and decryption in java - servlet aes.js
jar files

AES Password Encryption in javascript and decryption in java - servlet base64-2.3.7.jar
AES Password Encryption in javascript and decryption in java - servlet org-apache-commons-codec.jar

 

Create a web application in eclipse ide , and copy the below code .

 

Directory structure :

encryption

 

index.jsp

EncryptServlet.java

web.xml

Output

Client side:

enc

 

Server side :

output

 

 




Related Posts :
How to call Java Soap Web Service in JavaScript ( JavaScript client for SOAP Web Services )
How to Connect to Oracle from Liferay portlet ( Java Liferay and Oracle integration )
How to Connect Liferay 7 to PostgreSQL ( Java Liferay portlet and PostgreSQL integration )
How to call C# .Net WCF web service in java SOAP client ( Visual Studio 2013 )
How to call PHP RESTful web service in java client
How to call java SOAP web service in php ( php web service client )
Solution to SSLHandshakeException (skip the certificate for Java and LDAP bind)
Java RESTful web service example in maven using JAX-RS
   [will not be published]



^ <