Thursday, December 24, 2009

How do I encrypt and decrypt through different programming languages?

I have a back office system written in Coldfusion 6.1 that amongst other things stores usernames and passwords. The public website is written in ASP so my question is, is there a common algorithm that will allow me to encrypt usernames and passwords in Coldfusion and decrypt them in ASP?How do I encrypt and decrypt through different programming languages?
One very common (and secure) algorithm is MD5. MD5 is a one way hashing algorithm that takes a string (like a password) and generates a signature for it. For instance, MD5 (';sometext';) = a29e90948f4eee52168fab5fa9cfbcf8. MD5 is now used by a number of UNIX systems for storing passwords. Web sites using PHP and ASP can use MD5, too. Here's the general plot to the story of how to use MD5:





CONVERSION OF EXISTING DATA


1) Create a secure place to store username/password pairs. This could be a text file or table in an SQL database (recommended).


2) Insert each username in the data store you chose.


3) Use the MD5 function to create a hash of the user's password. Store this hash with the username.





USING THE DATA


1) Create web page that will accept the username and password of the user.


2) When the user hits submit, their username and password is sent in plain text. Use the MD5 function find the MD5 hash of their password.


3) If the username exists and the password hash matches, accept the login. Otherwise, reject.





I left a link to a page that shows how to use MD5 in ASP.How do I encrypt and decrypt through different programming languages?
Encryption and De-cryption of data is done based on some Algorithams. Please check ASP Encryption Algorithams for more details.

No comments:

Post a Comment