Migrating from BareboneThunks to cTlsSocket #2 #64
gaouservbf
started this conversation in
General
Replies: 5 comments 5 replies
|
msgbox had no content |
0 replies
|
I think issue is related to version difference between mdThunks and cTlsSocket |
1 reply
|
I have fixed both your code AND VBWebSocket. Public Function pvCryptoHashSha1(baRetVal() As Byte, baInput() As Byte, Optional ByVal Pos As Long, Optional ByVal Size As Long = -1) As Boolean
Const FUNC_NAME As String = "CryptoHashSha256"
Dim lPtr As Long
Dim hHash As Long
If Size < 0 Then
Size = pvArraySize(baInput) - Pos
Else
Debug.Assert pvArraySize(baInput) >= Pos + Size
End If
If Size > 0 Then
lPtr = VarPtr(baInput(Pos))
End If
pvArrayAllocate baRetVal, LNG_SHA1_HASHSZ, FUNC_NAME & ".baRetVal"
If CryptCreateHash(m_uData.hRandomProv, CALG_SHA1, 0, 0, hHash) = 0 Then
GoTo QH
End If
If CryptHashData(hHash, ByVal lPtr, Size, 0) = 0 Then
GoTo QH
End If
If CryptGetHashParam(hHash, HP_HASHVAL, baRetVal(0), LNG_SHA1_HASHSZ, 0) = 0 Then
GoTo QH
End If
'--- success
pvCryptoHashSha1 = True
QH:
If hHash <> 0 Then
Call CryptDestroyHash(hHash)
End If
End FunctionI made the SHA1 function public in your code. and rest is with VBWebSocket, unrelated to you. |
4 replies
|
I would have to copy and paste a new function, but I can just find the function from the dropbox and make it public. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
I just had a blank response
-Windows XP Service Pack 3 SSE2 enabled x86
All reactions