Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrSM2InvalidKey = errors.New("key is invalid") ErrSM2InvalidKeyType = errors.New("key is of invalid type") ErrSM2Verification = errors.New("sm2: verification error") )
View Source
var (
ErrKeyMustBePEMEncoded = errors.New("invalid key: Key must be a PEM encoded PKCS1 or PKCS8 key")
)
Functions ¶
func ParseSM2PrivateKeyFromPEM ¶
func ParseSM2PrivateKeyFromPEM(key []byte) (*sm2.PrivateKey, error)
解析 SM2 PKCS8 私钥
func ParseSM2PrivateKeyFromPEMWithPassword ¶
func ParseSM2PrivateKeyFromPEMWithPassword(key []byte, password string) (*sm2.PrivateKey, error)
解析 SM2 PKCS8 私钥带密码
Types ¶
type SigningMethodSM2 ¶
type SigningMethodSM2 struct{}
*
- 国密 SM2 签名验证 *
- @create 2022-4-16
- @author deatil
var (
SigningMethodGmSM2 *SigningMethodSM2
)
Click to show internal directories.
Click to hide internal directories.