Versions in this module Expand all Collapse all v2 v2.3.3 Oct 19, 2023 Changes in this version + const ALGORITHM_TYPE_SM2_SIGNATURE + const KEY_TYPE_SM2_SIGNATURE + const MODE_DIGEST + const MODE_RAW + func CreateConnection(kmsConfig *KMSConfig) (*kms.Client, error) + func ExportPublicKeyFromKMS(keyId string, client *kms.Client) (bccrypto.PublicKey, error) + func GenerateKeyPairFromKMS(client *kms.Client, keyAlias, keyType string) (bccrypto.PrivateKey, error) + func LoadPrivateKey(client *kms.Client, skInfo []byte) (bccrypto.PrivateKey, error) + func NewPrivateKey(client *kms.Client, keyConfig *KMSPrivateKeyConfig) (bccrypto.PrivateKey, error) + type KMSConfig struct + SecretId string + SecretKey string + ServerAddress string + ServerRegion string + type KMSPrivateKeyConfig struct + KeyAlias string + KeyId string + KeyType string + type PrivateKey struct + func (sk *PrivateKey) Bytes() ([]byte, error) + func (sk *PrivateKey) PublicKey() bccrypto.PublicKey + func (sk *PrivateKey) Sign(data []byte) ([]byte, error) + func (sk *PrivateKey) SignWithOpts(msg []byte, opts *bccrypto.SignOpts) ([]byte, error) + func (sk *PrivateKey) String() (string, error) + func (sk *PrivateKey) ToStandardKey() crypto.PrivateKey + func (sk *PrivateKey) Type() bccrypto.KeyType + type Signer struct + func (signer *Signer) Public() crypto.PublicKey + func (signer *Signer) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error)