Sample code for 30+ languages & platforms
Swift

Example: Crypt2.GetSignatureSigningTimeStr method

Demonstrates how to call the GetSignatureSigningTimeStr method.

Chilkat Swift Downloads

Swift

func chilkatTest() {
    var success: Bool = false

    let crypt = CkoCrypt2()!

    success = crypt.verifyP7M(p7mPath: "qa_data/cades/CAdES-T/Signature-C-T-1.p7m", destPath: "qa_output/out.dat")
    if success == false {
        print("\(crypt.lastErrorText!)")
        return
    }

    var numSigners: Int = crypt.numSignerCerts.intValue
    print("Num Signers = \(numSigners)")

    var i: Int = 0
    while i < numSigners {
        if crypt.hasSignatureSigningTime(index: i) == true {
            print("\(i + 1): \(crypt.getSignatureSigningTimeStr(index: i)!)")
        }
        else {
            print("\(i + 1): has no signing time.")
        }

        i = i + 1
    }

    // Sample output:

    // Num Signers = 1
    // 1: Sun, 03 Dec 2013 06:57:41 GMT

}