Documentation
¶
Overview ¶
Package branca implements the branca token specification.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidToken indicates an invalid token. ErrInvalidToken = errors.New("invalid base62 token") // ErrInvalidTokenVersion indicates an invalid token version. ErrInvalidTokenVersion = errors.New("invalid token version") // ErrBadKeyLength indicates a bad key length. ErrBadKeyLength = errors.New("bad key length") )
Functions ¶
This section is empty.
Types ¶
type Branca ¶
type Branca struct { Key string // contains filtered or unexported fields }
Branca holds a key of exactly 32 bytes. The nonce and timestamp are used for acceptance tests.
func (*Branca) DecodeToString ¶
DecodeToString decodes the data.
func (*Branca) EncodeToString ¶
EncodeToString encodes the data matching the format: Version (byte) || Timestamp ([4]byte) || Nonce ([24]byte) || Ciphertext ([]byte) || Tag ([16]byte)
type ErrExpiredToken ¶
ErrExpiredToken indicates an expired token.
func (*ErrExpiredToken) Error ¶
func (e *ErrExpiredToken) Error() string
Click to show internal directories.
Click to hide internal directories.