Documentation
¶
Index ¶
Constants ¶
const (
KeyPrefix = "mtk_"
)
Variables ¶
This section is empty.
Functions ¶
func BurnPasswordCheck ¶
func BurnPasswordCheck(pw string)
func CheckPassword ¶
func HashPassword ¶
func NewAPIKey ¶
NewAPIKey returns a full key, the short prefix safe to display, and its hash for storage.
func ValidatePassword ¶
Types ¶
type Sealer ¶
type Sealer struct {
// contains filtered or unexported fields
}
Sealer encrypts values at rest with AES-256-GCM using a key file kept next to the database.
func LoadOrCreateSealer ¶
LoadOrCreateSealer reads the key file at path, creating it (mode 0600) on first use.