secretboxutil

package
v0.66.5 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenBase32String

func OpenBase32String(ciphertext32 string, secretKeyBytes []byte) ([]byte, error)

OpenBase32String opens a base32 encoded message.

func OpenBox

func OpenBox(ciphertext []byte, secretKeyBytes []byte) ([]byte, error)

OpenBox opens a message which is prefixed by a nonce.

func SealBase32String

func SealBase32String(plaintext, secretKeyBytes []byte) (string, error)

SealBase32String seals a message and returns a base32 encoded string. Example secret key: secretKeyBytes, err := hex.DecodeString("6368616e676520746869732070617373776f726420746f206120736563726574")

func SealBox

func SealBox(plaintext, secretKeyBytes []byte) ([]byte, error)

SealBox seals a message using a supplied secret key and random nonce which is appended to the message.

Types

This section is empty.

Jump to

Keyboard shortcuts

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