xsecretbox

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 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 = chacha20.KeySize
	// NonceSize is what the name suggests
	NonceSize = chacha20.NonceSizeX
	// TagSize is what the name suggests
	TagSize = poly1305.TagSize
	// BlockSize is what the name suggests
	BlockSize = 64
)

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 [curve25519.ScalarSize]byte, publicKey [curve25519.PointSize]byte) ([KeySize]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