Documentation ¶
Index ¶
- func GM_SM2_Decry(ciphertext []byte, priv *sm2.PrivateKey) (origData []byte, err error)
- func GM_SM2_Encry(origData []byte, pub *sm2.PublicKey) (ciphertext []byte, err error)
- func GM_SM2_Sign(origData, key string) (sign string, err error)
- func GM_SM2_Verify(origData, sign, key string) (isok bool, err error)
- func GM_SM3_Hash(origData string) (hash string)
- func GM_SM4_Dec(ciphertext string, key string) (origData string, err error)
- func GM_SM4_Ecb(origData string, key string) (ciphertext string, err error)
- func GenerateKey(key string) (*sm2.PrivateKey, error)
- func ReadPrivateKeyFromPem(privateKeyPem []byte, pwd []byte) (*sm2.PrivateKey, error)
- func ReadPublicKeyFromPem(privateKeyPem []byte) (*sm2.PublicKey, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GM_SM2_Decry ¶
func GM_SM2_Decry(ciphertext []byte, priv *sm2.PrivateKey) (origData []byte, err error)
/国密—SM2-解密
func GM_SM2_Encry ¶
/国密—SM2-加密
func GM_SM2_Verify ¶
/国密—SM2-验签
func GM_SM4_Dec ¶
/国密-SM4-sm4Ecb模式pksc7填充加密
func GM_SM4_Ecb ¶
/国密-SM4-sm4Ecb模式pksc7填充加密
func ReadPrivateKeyFromPem ¶
func ReadPrivateKeyFromPem(privateKeyPem []byte, pwd []byte) (*sm2.PrivateKey, error)
/读取私钥
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.