Help us shape the future of Go! Take the 2026 Go Developer Survey

requeststate

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 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