hmac

package
v0.0.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HMACEqual

func HMACEqual(mac1, mac2 []byte) bool

HMACEqual reports whether two MACs are equal, in constant time. A non-constant-time comparison of a MAC is a timing oracle: never compare signatures with == or a byte loop that returns early.

func HMACSHA256

func HMACSHA256(key, message []byte) []byte

HMACSHA256 returns the HMAC-SHA256 of message under key. Used by tinywasm/jwt to sign JWT session tokens.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL