ilusm.dev

hmac

HMAC computation and constant-time comparison for auth flows.

Load with: use hmac

Quick example

use hmac

result = hmacs("hello", "value")
prn(result)

Functions

Functions

hmacs(key, data)

Performs the operation. Takes key, data.

hmac2(key, data)

Performs the operation. Takes key, data.

hmac5(key, data)

Performs the operation. Takes key, data.

hmacm(key, data)

Performs the operation. Takes key, data.

hmacv(key, data, sig)

Performs the operation. Takes key, data, sig.

hmcv2(key, data, sig)

Performs the operation. Takes key, data, sig.

hmceq(a, b)

Performs the operation. Takes a, b.

hmchx(data)

Performs the operation. Takes data.

Module aliases

These are the public-facing names you call with use hmac:

  • hmac.s25(k, d)
  • hmac.s51(k, d)
  • hmac.md5(k, d)
  • hmac.vfy(k, d, s)
  • hmac.eq(a, b)
  • hmac.hex(d)

Notes

  • HMAC computation - SHA-256, SHA-512.