|
-
Mar 7th, 2010, 01:20 PM
#7
New Member
Re: [VB6] CryptoAPI MD5 Hash
Thank you for posting this, I was able to import this into an Access 2007 VBA application I have that signs webservice request for Flickr, had to make one minor adjustment to get it to calculate MD5 hash correct (since it didn't match what i had been using and fails) -
in HashBlock() should not add + 1 to the the length because the Lbound() is already starting with 0
Private Sub HashBlock(ByRef Block() As Byte)
'Attribute HashBlock.VB_Description = "Hash a block of data"
If CryptHashData(m_hHash, _
Block(LBound(Block)), _
UBound(Block) - LBound(Block) + 0, _
0&) = 0 Then
Err.Raise vbObjectError Or &HC312&, _
"MD5Hash", _
"Failed to hash data block, system error " _
& CStr(Err.LastDllError)
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|