QuickHash Library Type Library

SHA512_Calculate

void SHA512_Calculate( [out]SHA512_Digest* pDigest, [ in , size_is( nSrcLength ) ] const void* pSrc, [ in ] int nSrcLength );

Parameters

 pDigest

    [out] A memory buffer that will receive the message digest.

     Note. All predefined types are specified in the Predefined Types List.

 pSrc

    [in] A continuous memory block for which to calculate the message digest.

 nSrcLength

    [in] Length in bytes of the memory block. 

Remarks

Calculates the SHA-2(512) message digest for the  pSrc memory block. The digest is retrieved in the pDigest memory buffer.

VB Example

Private Sub MyButton_Click()   
    Dim Digest As SHA512_Digest
    Dim MyStrData As String
    MyStrData = "Hello World!"
    Dim nLen As Long
    nLen = Len(MyStrData)
    'Convert the string to byte array
    Dim MyBinData() As Byte
    ReDim MyBinData(1 To nLen)    
    For i = 1 To nLen
        MyBinData(i) = Asc(Mid(MyStrData, i, 1))
    Next i    
    'Get the digest
    SHA512_Calculate Digest, MyBinData(1), nLen
    'Show the hexadecimal representation of the digest
    MsgBox QHASH_ConvertToHex(Digest.Value(0), SHA512_DIGESTSIZE, True)
End Sub

 

 

Type Library Overview   |   Type Library Functions   |   Useful Links   |   HashCalc

 

See Also    SHA512_CalculateHex, SHA512_CalculateStr, SHA512_CalculateStrHex, QHASH_ConvertToHex


 

 

Send Feedback to SlavaSoft Inc. Tell a friend about QuickHash Library