requeststate

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sealer

type Sealer struct {
	// contains filtered or unexported fields
}

Sealer protects request state with AES-256-GCM.

func New

func New(encodedKey string) (*Sealer, error)

New constructs a sealer from a standard Base64-encoded 32-byte key.

func NewRandom

func NewRandom() (*Sealer, error)

NewRandom constructs a sealer with a process-local random key.

func (*Sealer) Open

func (s *Sealer) Open(token string) ([]byte, error)

Open verifies and decrypts a token produced by Seal.

func (*Sealer) Seal

func (s *Sealer) Seal(_ context.Context, plaintext []byte) (string, error)

Seal encrypts and authenticates plaintext into a URL-safe opaque token.

Jump to

Keyboard shortcuts

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