klyn.cryptography.Mac.doFinal
method
public doFinal(text as String = null) as Digest throws CryptoException:
Description

Computes the MAC for the buffered text and an optional final chunk.

Parameters
  • text Optional final UTF-8 chunk.
Returns

Structured MAC result.

Throws
  • CryptoException when the key is missing or the operation fails. ```klyn import klyn.cryptography mac = Hmac(SHA256()) mac.init("secret") digest = mac.doFinal("hello") print(digest.hex) ```