?
Solved

VB.net Function to match ColdFusion hash function

Posted on 2004-09-07
4
Medium Priority
?
335 Views
Last Modified: 2013-12-24
I am looking for some VB.net code to match the ColdFusion Function hash().

I am working on a Web/Client application that is caching some security on the client and needs to work in a disconnected environment using vb.net.  the passwords have been saved after using the hash function.  

here is a sample if the vb code I have tried but the result does not match  the result from hash("test")
 
Dim md5Hasher As New MD5CryptoServiceProvider
Dim hashedBytes As Byte()
Dim encoder As New UTF8Encoding
hashedBytes = md5Hasher.ComputeHash(encoder.GetBytes("test"))
        Dim hashString As String
        hashString = Convert.ToBase64String(hashedBytes)

any ideas?
0
Comment
Question by:wrenfro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 

Author Comment

by:wrenfro
ID: 12001205
The ColdFusion page returns the hash as a hex representation

the following code will do the same in VB.NET

Dim PWordbyte As Byte

        For Each PWordbyte In hashedBytes
            hashString = hashString & String.Format("{0:X2}", PWordbyte)
        Next
0
 
LVL 35

Accepted Solution

by:
mrichmon earned 500 total points
ID: 12050006
The problem is that there is a key that is assigned to seed the hash and it will be different in CF and VB.

I don't know that with the default hash seed that you will be able to do this without setting the see your self in the respective applications
0

Featured Post

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
Suggested Courses
Course of the Month14 days, 2 hours left to enroll

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question