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
  • key Secret key material.
  • keyEncoding Key encoding: `utf8`, `hex`, `base64` or `base64url`. ```klyn import klyn.cryptography mac = Hmac(SHA256()) mac.init("secret") ```