How to store password as MD5 hash


Badge +4

Hello folks,

I need to store the password entered by user in K2 form to be stored as encrypted MD5 password in ms sql db. 

please share if you have any idea.


3 replies

Badge +8

Hi  Mani-Natarajan,


 


What is your scenario? If you could provide more information, we can possibly help you.


Its recommended to not build login forms through Smartforms.


 


 

Badge +4

When a user try to access the web application , system would promt to enter  user name and password for existing user and create new username and password for new users in the K2 smartform:

I need to :

1. when new user enter the password and confirm password for the first time , it need to be compared whether the value match between the two input fields to continue.

2. if the password values match then it needs to be convert it in to MD5 hash before updating the password in the DB table.

 

Any idea would be helpful.

Thanks

Mani

 

Badge +8

Hi Mani,


 


It sounds like you are building an anonymous SmartForm that receives a username and password which is used for validation before loading the rest of the form. 


 


We would recommend not building such a solution as subsequent HTTP requests would be done in an anonymous and unauthenticated way which could result in security issues.


 


Rather make use of the built in authentication mechanisms available in the product, such as SQLUM: https://help.k2.com/onlinehelp/k2five/icg/current/default.htm#Configure/UM-SQLUM.htm, which will make sure every HTTP request validates that the user is authenticated.


 


To answer your direct question, there is nothing "Out of the box" that allows you to covert input values to MD5 hash and to accomplish something like that, SmartObject Service types like SQL Server Service, REST, Endpoint WebService or Endpoint Assembly should be used.


 


I hope this helps.


 

Reply