Sample code for 30+ languages & platforms
Swift

Example: SecureString.HashVal method

Demonstrates the HashVal method.

Chilkat Swift Downloads

Swift

func chilkatTest() {
    var success: Bool = false

    let str = CkoSecureString()!
    str.maintainHash = "sha256"
    str.append(str: "Hello World")

    var encodedHash: String? = str.hashVal(encoding: "base64")
    print("\(encodedHash!)")

}