Sample code for 30+ languages & platforms
PureBasic

Example: Crypt2.CrcFile method

Demonstrates how to call the CrcFile method.

Chilkat PureBasic Downloads

PureBasic
IncludeFile "CkCrypt2.pb"

Procedure ChilkatExample()

    crypt.i = CkCrypt2::ckCreate()
    If crypt.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    filePath.s = "c:/temp/someFile.dat"

    crc32.i = CkCrypt2::ckCrcFile(crypt,"crc-32",filePath)
    Debug Str(crc32)

    crc8.i = CkCrypt2::ckCrcFile(crypt,"crc8",filePath)
    Debug Str(crc8)


    CkCrypt2::ckDispose(crypt)


    ProcedureReturn
EndProcedure