lc

package
v0.0.0-...-0dcfdb9 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PublicKeySize   = 32
	PrivategKeySize = 32
)
View Source
const (
	VericationKeySize = 32
	SigningKeySize    = 64
	SignatureSize     = 64
)
View Source
const (
	HashOutputLen = 32
)

Variables

This section is empty.

Functions

func Compress

func Compress(data []byte) ([]byte, error)

func Decompress

func Decompress(in []byte) ([]byte, error)

func Decrypt

func Decrypt(ct, pub, pk []byte) (data []byte, err error)

func Encrypt

func Encrypt(pub, data []byte) (ct []byte, err error)

Encrypt encrypts data, potentially overwriting the underlying data in the process!

func EncryptKeyGen

func EncryptKeyGen() (pub, pk []byte, err error)

func Hash

func Hash(data ...[]byte) []byte

Hash hashes the data.

func Khash

func Khash(key []byte, data ...[]byte) []byte

Khash hashes the data with a key.

func Sign

func Sign(sk, msg []byte) []byte

func SigningKeyGen

func SigningKeyGen() (vk, sk []byte, err error)

func Verify

func Verify(vk, msg, signature []byte) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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