nacl

package
v0.0.0-...-53e2619 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NaclKeyBytesSize ..
	NaclKeyBytesSize = 32
)

Variables

This section is empty.

Functions

func ConvertBoxPkToBytes

func ConvertBoxPkToBytes(pk interface{}) ([]byte, error)

ConvertBoxPkToBytes ..

func CreateBoxPkFromBytes

func CreateBoxPkFromBytes(pk []byte) ([NaclKeyBytesSize]byte, error)

CreateBoxPkFromBytes ..

func IsValidBoxPkBytes

func IsValidBoxPkBytes(pk interface{}) bool

IsValidBoxPkBytes ..

Types

type BoxKeyPair

type BoxKeyPair struct {
	Pk [NaclKeyBytesSize]byte
	Sk [NaclKeyBytesSize]byte
}

BoxKeyPair ..

func GenerateBoxKeyPair

func GenerateBoxKeyPair() (*BoxKeyPair, error)

GenerateBoxKeyPair ..

func NewBoxKeyPair

func NewBoxKeyPair(pk [NaclKeyBytesSize]byte, sk [NaclKeyBytesSize]byte) *BoxKeyPair

NewBoxKeyPair ..

func (*BoxKeyPair) Clone

func (box *BoxKeyPair) Clone() *BoxKeyPair

Clone ..

func (*BoxKeyPair) PkEqualTo

func (box *BoxKeyPair) PkEqualTo(target [NaclKeyBytesSize]byte) bool

PkEqualTo ..

func (*BoxKeyPair) SkEqualTo

func (box *BoxKeyPair) SkEqualTo(target [NaclKeyBytesSize]byte) bool

SkEqualTo ..

Jump to

Keyboard shortcuts

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