crypto

package
v0.0.0-...-194be82 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const HASH_LENGTH = 32
View Source
const LIBRA_HASH_SUFFIX = "@@$$LIBRA$$@@"
View Source
const (
	RAW_TRANSACTION = "RawTransaction"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CryptoHasher

type CryptoHasher struct {
	// contains filtered or unexported fields
}

func NewCryptoHasher

func NewCryptoHasher(salt []byte) *CryptoHasher

func (*CryptoHasher) Hash

func (c *CryptoHasher) Hash(data []byte) *HashValue

type HashValue

type HashValue struct {
	// contains filtered or unexported fields
}

func (*HashValue) GetValue

func (h *HashValue) GetValue() [HASH_LENGTH]byte

type KeyPair

type KeyPair struct {
	PrivateKey *PrivateKey
	PublicKey  *PublicKey
}

func NewKeyPair

func NewKeyPair(secret []byte) *KeyPair

type PrivateKey

type PrivateKey struct {
	Value ed25519.PrivateKey
}

type PublicKey

type PublicKey struct {
	Value ed25519.PublicKey
}

type Signature

type Signature struct {
	Value []byte
}

func SignMessage

func SignMessage(msg *HashValue, privateKey *PrivateKey) *Signature

Jump to

Keyboard shortcuts

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