ecdsa

package
v1.0.2001 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyMustBePEMEncoded = errors.New("invalid key: Key must be a PEM encoded PKCS1 or PKCS8 key")
	ErrKeyPasswordInvalid  = errors.New("invalid key: Key password error")
)
View Source
var (
	SigningMethodES256K *jwt.SigningMethodECDSA
)

Functions

func ParsePrivateKeyFromPEM

func ParsePrivateKeyFromPEM(key []byte) (*ecdsa.PrivateKey, error)

解析 PKCS8 私钥

func ParsePrivateKeyFromPEMWithPassword

func ParsePrivateKeyFromPEMWithPassword(key []byte, password string) (*ecdsa.PrivateKey, error)

解析 PKCS8 私钥带密码

func ParsePublicKeyFromPEM

func ParsePublicKeyFromPEM(key []byte) (*ecdsa.PublicKey, error)

解析 PKCS8 公钥

Types

This section is empty.

Jump to

Keyboard shortcuts

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