xsecretbox

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Unlicense Imports: 5 Imported by: 0

Documentation

Overview

Package xsecretbox implements encryption/decryption of a message using specified keys

Index

Constants

View Source
const (
	// KeySize is what the name suggests
	KeySize = 32
	// NonceSize is what the name suggests
	NonceSize = 24
	// TagSize is what the name suggests
	TagSize = 16
)

Variables

This section is empty.

Functions

func Open

func Open(out, nonce, box, key []byte) ([]byte, error)

Open does what the name suggests

func Seal

func Seal(out, nonce, message, key []byte) []byte

Seal does what the name suggests

func SharedKey

func SharedKey(secretKey [32]byte, publicKey [32]byte) ([32]byte, error)

SharedKey computes a shared secret compatible with the one used by `crypto_box_xchacha20poly1305`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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