Versions in this module Expand all Collapse all v2 v2.3.3 Oct 19, 2023 Changes in this version + func GenerateEncKeyPair(keyType crypto.KeyType) (crypto.DecryptKey, error) + func GenerateKeyPair(keyType crypto.KeyType) (crypto.PrivateKey, error) + func GenerateKeyPairBytes(keyType crypto.KeyType) (sk, pk []byte, err error) + func GenerateKeyPairPEM(keyType crypto.KeyType) (sk string, pk string, err error) + func ParsePrivateKey(der []byte) (crypto2.PrivateKey, error) + func ParsePublicKey(der []byte) (crypto2.PublicKey, error) + func ParseSM2PublicKey(asn1Data []byte) (*tjsm2.PublicKey, error) + func PrivateKeyFromDER(der []byte) (crypto.PrivateKey, error) + func PrivateKeyFromPEM(raw []byte, pwd []byte) (crypto.PrivateKey, error) + func PublicKeyFromDER(der []byte) (crypto.PublicKey, error) + func PublicKeyFromPEM(raw []byte) (crypto.PublicKey, error) + func Sign(sk interface{}, data []byte) ([]byte, error) + func Verify(pk interface{}, data, sig []byte) (bool, error) + func WriteFile(keyType crypto.KeyType, filePath string) error