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

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