sm2

package
v0.0.0-...-59da782 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeSm2 = byte(0x03)
	NameSm2 = "sm2"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PrivKeySm2

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

PrivKey

func (PrivKeySm2) Bytes

func (privKey PrivKeySm2) Bytes() []byte

func (PrivKeySm2) Equals

func (privKey PrivKeySm2) Equals(other PrivKey) bool

func (PrivKeySm2) PubKey

func (privKey PrivKeySm2) PubKey() PubKey

func (PrivKeySm2) Sign

func (privKey PrivKeySm2) Sign(msg []byte) Signature

type PubKeySm2

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

PubKey

func (PubKeySm2) Bytes

func (pubKey PubKeySm2) Bytes() []byte

func (PubKeySm2) Equals

func (pubKey PubKeySm2) Equals(other PubKey) bool

func (PubKeySm2) KeyString

func (pubKey PubKeySm2) KeyString() string

func (PubKeySm2) VerifyBytes

func (pubKey PubKeySm2) VerifyBytes(msg []byte, sig Signature) bool

type SignatureSm2

type SignatureSm2 []byte

Signature

func (SignatureSm2) Bytes

func (sig SignatureSm2) Bytes() []byte

func (SignatureSm2) Equals

func (sig SignatureSm2) Equals(other Signature) bool

func (SignatureSm2) IsZero

func (sig SignatureSm2) IsZero() bool

func (SignatureSm2) String

func (sig SignatureSm2) String() string

type Sm2Driver

type Sm2Driver struct{}

func (Sm2Driver) GenKey

func (d Sm2Driver) GenKey() (PrivKey, error)

Crypto

func (Sm2Driver) PrivKeyFromBytes

func (d Sm2Driver) PrivKeyFromBytes(b []byte) (PrivKey, error)

func (Sm2Driver) PubKeyFromBytes

func (d Sm2Driver) PubKeyFromBytes(b []byte) (PubKey, error)

func (Sm2Driver) SignatureFromBytes

func (d Sm2Driver) SignatureFromBytes(b []byte) (Signature, error)

Jump to

Keyboard shortcuts

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