lang="en-US"> Password Encryption in Play - Knoldus Blogs
Site icon Knoldus Blogs

Password Encryption in Play

Reading Time: < 1 minute

Today,in this blog I would like to tell you about Password encryption in Play.
As you know that saving password in its plain form can lead to future problems, so its better to use an encryption technique before saving them to your database.I will be using ‘SHA-256’ encyption in the code given below.
In your project inside the util package, create a scala object named: “EncyptionUtility”. Delete the content and add the following code:

After adding this code, you just have to add the path name wherever you are using password.

Exit mobile version