secret

package
v0.0.0-...-1da2387 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package secret is a nicer wrapper around the nacl/secretbox package.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEncrypt = errors.New("secret: encryption error")
	ErrDecrypt = errors.New("secret: decryption error")
)

Functions

This section is empty.

Types

type Box

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

func NewBox

func NewBox(key [32]byte) *Box

func (*Box) Decrypt

func (b *Box) Decrypt(encrypted []byte) ([]byte, error)

func (*Box) Encrypt

func (b *Box) Encrypt(message []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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