klyn.cryptography.Mac.init
method

    public init(key as String, keyEncoding as String = "utf8") as Void:

Description

Loads the secret key used to compute the MAC.

Parameters

Parameter | Description
--- | ---
`key` | Secret key material.
`keyEncoding` | Key encoding: `utf8`, `hex`, `base64` or `base64url`.

Example

    import klyn.cryptography

    mac = Hmac(SHA256())
    mac.init("secret")