sodiumbox

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2016 License: MIT Imports: 5 Imported by: 4 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

SodiumBox LibSodium crypto_box_seal in Go

Pure go library for interacting with libsodiums crypto_box_seal

Install

go get github.com/mdp/sodiumbox

Test

cd $GOHOME/src/github.com/mdp/sodiumbox
go test -v
License: MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Content     []byte
	Box         []byte
	PublicKey   *[32]byte
	SecretKey   *[32]byte
	EphemeralSK *[32]byte
	EphemeralPK *[32]byte
	Nonce       *[24]byte
	RandReader  *io.Reader
}

Message struct where we do all the work

func Seal

func Seal(content []byte, publicKey *[32]byte) (*Message, error)

Seal crypto_box_seal_open

func SealOpen

func SealOpen(enc []byte, publicKey, secretKey *[32]byte) (*Message, error)

SealOpen = crypto_box_seal_open

func (*Message) Open

func (m *Message) Open() error

Open - seal the Message

func (*Message) Seal

func (m *Message) Seal() error

Seal - seal the Message compatible with libsodium

Jump to

Keyboard shortcuts

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