Documentation ¶
Overview ¶
Package crypt contains utilities to read and write encrypted text and protos.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyToken = errors.New("empty token") ErrExpiredToken = errors.New("expired token") )
Functions ¶
This section is empty.
Types ¶
type SignOption ¶
type SignOption func(c *configurator)
func WithTTL ¶
func WithTTL(ttl time.Duration) SignOption
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
func NewSigner ¶
NewSigner creates a new signer with the following params:
- signature: 32 random characters.
- secret: 16, 24, or 32 random characters to select AES-128, AES-192, or AES-256.
func (*Signer) ReadMessage ¶
func (*Signer) SignMessage ¶
Click to show internal directories.
Click to hide internal directories.