secret

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package secret seals the few values the base must give back, not only check (the invitation links), with the server's key CALLBACK_SECRET (AES-256-GCM): a stolen base or backup does not give them away.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoKey = errors.New(config.Env("SECRET") + " is not set: openssl rand -base64 32")

Functions

func Check

func Check() error

Check tells a malformed key, so the server refuses to start on it; no key at all is ErrNoKey.

func Open

func Open(sealed string) (string, error)

Open decrypts what Seal gave.

func Seal

func Seal(plain string) (string, error)

Seal encrypts plain, in base64.

Types

This section is empty.

Jump to

Keyboard shortcuts

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