Solved

VB.net Function to match ColdFusion hash function

Posted on 2004-09-07
4
331 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
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 125 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Server specifications for web hosting 7 93
Tool to email me when a website changes 29 133
Strange space issue in Chrome browser 8 114
New OSQA server has a ton of fake users 4 71
This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

856 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