DataFlex
DataFlex
Example: Crypt2.CrcBd method
Demonstrates how to call the CrcBd method.Chilkat DataFlex Downloads
Use ChilkatAx-win32.pkg
Procedure Test
Handle hoCrypt
Variant vBd
Handle hoBd
Boolean iSuccess
UInteger iCrc32
UInteger iCrc8
Get Create (RefClass(cComChilkatCrypt2)) To hoCrypt
If (Not(IsComObjectCreated(hoCrypt))) Begin
Send CreateComObject of hoCrypt
End
Get Create (RefClass(cComChilkatBinData)) To hoBd
If (Not(IsComObjectCreated(hoBd))) Begin
Send CreateComObject of hoBd
End
Get ComAppendString Of hoBd "123456789" "us-ascii" To iSuccess
Get pvComObject of hoBd to vBd
Get ComCrcBd Of hoCrypt "crc-32" vBd To iCrc32
// The decimal value is 3421780262 (converted to hex is 0xCBF43926)
Showln iCrc32
Get pvComObject of hoBd to vBd
Get ComCrcBd Of hoCrypt "crc8" vBd To iCrc8
Showln iCrc8
End_Procedure