gitee.com/ks-custle/core-gm@v0.0.0-20230922171213-b83bdd97b62c/txsec/xt_sec_inerface.go (about)

     1  package txsec
     2  
     3  type XTSec interface {
     4  	GenKeyPair(keyId string) ([]byte, error)
     5  
     6  	MakeP10(keyId string, dn string) ([]byte, error)
     7  
     8  	SaveCert(keyId string, signCert []byte, signCertLen int) error
     9  
    10  	GetPubKey(keyId string) ([]byte, error)
    11  
    12  	Sign(keyId string, msg []byte) ([]byte, error)
    13  
    14  	VerifySign(publicKey []byte, msg []byte, signData []byte) bool
    15  
    16  	Encrypt(publicKey []byte, msg []byte) ([]byte, error)
    17  
    18  	Decrypt(keyId string, encData []byte) ([]byte, error)
    19  
    20  	ChangeContId(keyId string, newKeyId string) error
    21  }