crypto

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: LGPL-3.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type KeyType

type KeyType = string

KeyType str

const Ed25519Type KeyType = "ed25519"

Ed25519Type ed25519

const Secp256k1Type KeyType = "secp256k1"

Secp256k1Type secp256k1

const Sr25519Type KeyType = "sr25519"

Sr25519Type sr25519

type Keypair

type Keypair interface {
	Sign(msg []byte) ([]byte, error)
	Public() PublicKey
	Private() PrivateKey
}

Keypair interface

type PrivateKey

type PrivateKey interface {
	Sign(msg []byte) ([]byte, error)
	Public() (PublicKey, error)
	Encode() []byte
	Decode([]byte) error
	Hex() string
}

PrivateKey interface

type PublicKey

type PublicKey interface {
	Verify(msg, sig []byte) (bool, error)
	Encode() []byte
	Decode([]byte) error
	Address() common.Address
	Hex() string
}

PublicKey interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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