OxL Reference

method hmac.sha512

HMAC-SHA-512 of input under key (64 bytes).

Example:

oxl✓ checked in CI
use std.crypto { hmac }
use std.ser { bytesOf }

fn main() io {
  print("{hmac.sha512(bytesOf(&"key"), bytesOf(&"message")).len()}")
}
Output
64
pub(api) static fn sha512(key: bytes, input: bytes) -> bytes

Complexity. O(n) in the size of the input.

Since. 1.0.0-beta

Parameters

NameType
keybytes
inputbytes

Returns

bytes

Effects

none declared (pure unless the body says otherwise)

Defined in: std/crypto/crypto.oxl:252

See also