Hashing entirely in memory (VB example)
In This Topic
Visual Basic |
Copy Code |
Dim xHash As New XceedHashing
Call xHash.License( "your license key" )
Dim vaSource As Variant Dim vaHash As Variant
Set xHash.HashingMethod = New XceedSHAHashingMethod
vaSource = "This is the data to hash"
On Error Resume Next
xHash.HashingMethod.HashSize = 256
Call xHash.Hash(vaSource, True)
vaHash = xHash.HashingMethod.HashValue
If Err.Number <> 0 Then Call MsgBox("Error 0x" & Hex(Err.Number) & " " & Err.Description) Else Call MsgBox("Data hashed successfully to " & Str$(LenB(vaHash) * 8) & " bits") End If
On Error Goto 0
Set xHash = Nothing |