Knowledge Essentials - 3Essentials Hosting

ASPCrypt - One Way Encryption

Article ID: 302

 Back to Search

ASPCrypt - One Way Encryption
Below is an example on how to use ASPCrypt object. This can be used when you want to store or compare data, but you would like the data to be encrypted, such as passwords. Note, this is one way the encryption cannot be de-crypted. To compare a stored encryption you should first encrypt the data then compare the two encrypted values. This test code only shows how the object works.
<%
Set Cryptor = Server.CreateObject ("AspCrypt.Crypt")
'Key to use for encryption
strKey = "MyKey"
'The text to Encrypt
strValue = "Text to Encrypt"
Response.Write "The crypted valued is " & Cryptor.Crypt (strKey, strValue)
Set Cryptor = nothing
%>
 
Downloads Associated With This Article
No downloads are currently associated with this article.