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 私钥带密码
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.