backend

package
v3.0.8+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: LGPL-3.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ed25519

type Ed25519 struct{}

Ed25519 is the ed25519 crypto algorithm

func (*Ed25519) CheckSeckey

func (b *Ed25519) CheckSeckey(seckey []byte) error

CheckSeckey ...

func (*Ed25519) GenSeckey

func (b *Ed25519) GenSeckey() []byte

GenSeckey will generate the secret key by ed25519

func (*Ed25519) GetPubkey

func (b *Ed25519) GetPubkey(seckey []byte) []byte

GetPubkey will get the public key of the secret key by ed25519

func (*Ed25519) Sign

func (b *Ed25519) Sign(message []byte, seckey []byte) []byte

Sign will signature the message with seckey by ed25519

func (*Ed25519) Verify

func (b *Ed25519) Verify(message []byte, pubkey []byte, sig []byte) bool

Verify will verify the message with pubkey and sig by ed25519

type Secp256k1

type Secp256k1 struct{}

Secp256k1 is the secp256k1 crypto algorithm

func (*Secp256k1) CheckSeckey

func (b *Secp256k1) CheckSeckey(seckey []byte) error

CheckSeckey ...

func (*Secp256k1) GenSeckey

func (b *Secp256k1) GenSeckey() []byte

GenSeckey will generate the secret key by secp256k1

func (*Secp256k1) GetPubkey

func (b *Secp256k1) GetPubkey(seckey []byte) []byte

GetPubkey will get the public key of the secret key by secp256k1

func (*Secp256k1) Sign

func (b *Secp256k1) Sign(message []byte, seckey []byte) []byte

Sign will signature the message with seckey by secp256k1

func (*Secp256k1) Verify

func (b *Secp256k1) Verify(message []byte, pubkey []byte, sig []byte) bool

Verify will verify the message with pubkey and sig by secp256k1

Jump to

Keyboard shortcuts

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