Documentation
¶
Overview ¶
Package secret mints and compares one-time secrets over crypto/rand: tokens, numeric and alphabet codes, their stored digests and constant-time comparison. Every secret AuthKit issues comes from here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Code ¶
Code returns n characters drawn uniformly from alphabet (single-byte characters). crypto/rand.Int samples by rejection, so no character is favored whatever the alphabet's size.
func Equal ¶
Equal compares two secrets, or their digests, in constant time; differing lengths compare unequal. Every secret comparison goes through it.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.