signers

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ECDSA_Curve_P224 = "P224"
View Source
const ECDSA_Curve_P256 = "P256"
View Source
const ECDSA_Curve_P384 = "P384"
View Source
const ECDSA_Curve_P521 = "P521"

Variables

This section is empty.

Functions

This section is empty.

Types

type ISigner

type ISigner interface {
	/* 签名器的名称 */
	GetNames() []string

	/* 对数据进行签名 */
	Sign(privateKey keypairs.PrivateKey, hash []byte) ([]byte, error)

	/* 验证签名 */
	Verify(publicKey keypairs.PublicKey, hash []byte, signature []byte) (bool, error)
}

type Signer_ECDSA_der

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

func NewSigner_ECDSA_der

func NewSigner_ECDSA_der(curve string) *Signer_ECDSA_der

func (Signer_ECDSA_der) GetNames

func (s Signer_ECDSA_der) GetNames() []string

func (Signer_ECDSA_der) Sign

func (s Signer_ECDSA_der) Sign(privateKey keypairs.PrivateKey, hash []byte) ([]byte, error)

func (Signer_ECDSA_der) Verify

func (s Signer_ECDSA_der) Verify(publicKey keypairs.PublicKey, hash []byte, signature []byte) (bool, error)

Jump to

Keyboard shortcuts

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