ilusm.dev

otp

One-time pad/token generation, disposable secrets, nonce management.

Load with: use otp

Quick example

use otp

result = otpgn(10)
prn(result)

Functions

Functions

otpgn(len)

Performs the operation. Takes len.

otphx(len)

Performs the operation. Takes len.

otpnu(len)

Performs the operation. Takes len.

otpb6(len)

Performs the operation. Takes len.

otptk(len, ttl_ms)

Performs the operation. Takes len, ttl_ms.

otpok(t)

Performs the operation. Takes t.

otpst()

Sets a value or starts a process.

otpad(st, key, ttl_ms)

Adds an item. Takes st, key, ttl_ms.

otpvf(st, key, tok)

Performs the operation. Takes st, key, tok.

otpnc()

Performs the operation.

Module aliases

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

  • otp.gen(l)
  • otp.hex(l)
  • otp.num(l)
  • otp.b64(l)
  • otp.tok(l, t)
  • otp.ok(t)
  • otp.st()
  • otp.add(s, k, t)
  • otp.vfy(s, k, t)
  • otp.nonce()

Notes

  • One-time passwords - TOTP/HOTP (RFC 6238/4226).