crypto

package
v0.0.0-...-f5f0bdb Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NaclDecrypt

func NaclDecrypt(box []byte, nonce [24]byte, secret [32]byte) ([]byte, error)

NaclDecrypt ... note: use pointers???

func NaclEncrypt

func NaclEncrypt(message []byte, nonce [24]byte, secret [32]byte) ([]byte, error)

NaclEncrypt ... note: use pointers???

func NaclSign

func NaclSign(secret [64]byte, message []byte) ([]byte, error)

NaclSign ... Using the 'agl' library because native nacl library doesn't support detached signatures.

func NaclVerify

func NaclVerify(digest []byte, signature []byte, publicKey [naclauth.KeySize]byte) bool

NaclVerify returns true if signature is a valid signature of digest by public key. Using the 'agl' library because native nacl library doesn't support detached signatures.

func NewBlake2b256Sig

func NewBlake2b256Sig(key, data []byte) ([]byte, error)

NewBlake2b256Sig ...

func NewBlake2b512Sig

func NewBlake2b512Sig(key, data []byte) ([]byte, error)

NewBlake2b512Sig ...

func NewNaclKeyPair

func NewNaclKeyPair() ([32]byte, [64]byte, error)

NewNaclKeyPair ...

func NewNaclKeyPairFromSeed

func NewNaclKeyPairFromSeed(seed []byte) ([32]byte, [64]byte, error)

NewNaclKeyPairFromSeed ... note: return pointers???

func NewXXHash

func NewXXHash(data []byte, bitLength int64) []byte

NewXXHash ...

func NewXXHash128

func NewXXHash128(data []byte) [16]byte

NewXXHash128 ...

func NewXXHash256

func NewXXHash256(data []byte) [32]byte

NewXXHash256 ...

func NewXXHash64

func NewXXHash64(data []byte) [8]byte

NewXXHash64 ...

Types

type Blake2b256Hash

type Blake2b256Hash [blake2b.Size256]uint8

Blake2b256Hash ...

func NewBlake2b256

func NewBlake2b256(data []byte) *Blake2b256Hash

NewBlake2b256 ...

func (Blake2b256Hash) Value

func (b Blake2b256Hash) Value() [blake2b.Size256]uint8

Value ...

type Blake2b512Hash

type Blake2b512Hash [blake2b.Size]uint8

Blake2b512Hash ...

func NewBlake2b512

func NewBlake2b512(data []byte) *Blake2b512Hash

NewBlake2b512 ...

type Hash

type Hash [sha256.Size]uint8

Hash ...

func NewSHA256

func NewSHA256(data []byte) *Hash

NewSHA256 ...

func (Hash) Value

func (h Hash) Value() [sha256.Size]uint8

Value ...

Jump to

Keyboard shortcuts

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