Documentation
¶
Index ¶
Constants ¶
View Source
const SecretKeySize = 32
SecretKeySize is the required decoded length of an Authula secret. It matches the XChaCha20-Poly1305 key size used for token encryption.
Variables ¶
View Source
var ErrInvalidSecret = errors.New("invalid secret")
ErrInvalidSecret indicates that a secret is empty, contains whitespace, is not standard padded Base64, or does not decode to exactly SecretKeySize bytes.
Functions ¶
func DecodeSecret ¶ added in v1.51.0
DecodeSecret decodes a standard padded Base64 secret.
Types ¶
type HMACSigner ¶
type HMACSigner struct {
// contains filtered or unexported fields
}
func NewHMACSigner ¶
func NewHMACSigner(secret []byte) *HMACSigner
NewHMACSigner creates a signer from an already-decoded 32-byte key.
Click to show internal directories.
Click to hide internal directories.