Sample code for 30+ languages & platforms
Swift

Example: Crypt2.CrcFile method

Demonstrates how to call the CrcFile method.

Chilkat Swift Downloads

Swift

func chilkatTest() {
    let crypt = CkoCrypt2()!

    var filePath: String? = "c:/temp/someFile.dat"

    var crc32: UInt32 = crypt.crcFile(crcAlg: "crc-32", path: filePath)
    print("\(crc32)")

    var crc8: UInt32 = crypt.crcFile(crcAlg: "crc8", path: filePath)
    print("\(crc8)")

}