Generate SHA1 hash string in Classic ASP

Classic ASP does not enjoy a rich set of libraries for various functions (like in ASP.NET and PHP) and it requires components to be installed on the computer for it to work. So when I found this excellent resource on the internet and found it to be working correctly I had to share it with others so it could benefit others. If you have to generate SHA1 hash string in Classic ASP then you can run the following code to create the hash string.


<%
Option Explicit

Dim strName, strPhone, strEmail
Dim strInput, strOutput

strName = "Adam Sandler"
strPhone = "555 555 5555"
strEmail = "some@one.com"

strInput = strName & strPhone & strEmail 
strOutput = hex_sha1(strInput)

Response.Write(strOutput)
%>

Oh and if you are wondering where you can get the hex_sha1_js.asp file then download it from the link below.

Classic ASP script to generate SHA1 hash string

Please follow and like us:

Be the first to comment

Leave a Reply

Your email address will not be published.


*