Click here to Skip to main content
15,892,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have need to implement HMACSHA1 within VB6 and have come up against the first real reason for considering moving to vb.net (there are no doubt others but they just haven't caused me a problem yet) I can see how easy this would be using .cryptography but despite searching/looking at RFCs I haven't come up with a solution that generates the correct answers for a test set of inputs

Does anyone have this tee-shirt and is willing to share?
Posted
Updated 31-Mar-11 23:47pm
v2

1 solution

You could try the code HERE[^] and compare to a test data on a standalone .net implementation to ensure its validity


Here is another implementation, in the form of an ActiveX; http://www.example-code.com/vb/vb-sha-1_sha-256.asp[^]

There are others on the net, you just need to poke around for them. :)
 
Share this answer
 
v2
Comments
MikeD 2 4-Apr-11 12:41pm    
Thank you for the response

I am reluctant to use an activex solution as I don't want to build something into a product if I haven't seen all the source

I have seen the oode that you linked but was looking for hmacsha1 rather than sha1 also the key handling appears to be very specific in size whereas the solution I need has to handle a 17 character non hex key and a variable length string message

I am somewhat confident of the sha1 aspect of the code I am using but trying to hmac this doesn't produce the expected results

I appreciate my original question probably looked a bit lazy but there is a reasonable amount of code in my test project and I thought it would be too much to put in a code block. This is my first question so not entirely sure of the right way to do things

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900