Documentation ¶
Index ¶
- Constants
- 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
- type KMSPrivateKeyConfig
- type PrivateKey
- 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
Constants ¶
View Source
const ( MODE_DIGEST = "DIGEST" MODE_RAW = "RAW" KEY_TYPE_SM2_SIGNATURE = "ASYMMETRIC_SIGN_VERIFY_SM2" ALGORITHM_TYPE_SM2_SIGNATURE = "SM2DSA" )
Variables ¶
This section is empty.
Functions ¶
func ExportPublicKeyFromKMS ¶
func GenerateKeyPairFromKMS ¶
func LoadPrivateKey ¶
func NewPrivateKey ¶
func NewPrivateKey(client *kms.Client, keyConfig *KMSPrivateKeyConfig) (bccrypto.PrivateKey, error)
Types ¶
type KMSConfig ¶
type KMSPrivateKeyConfig ¶
type PrivateKey ¶
type PrivateKey struct {
// contains filtered or unexported fields
}
func (*PrivateKey) Bytes ¶
func (sk *PrivateKey) Bytes() ([]byte, error)
func (*PrivateKey) PublicKey ¶
func (sk *PrivateKey) PublicKey() bccrypto.PublicKey
func (*PrivateKey) Sign ¶
func (sk *PrivateKey) Sign(data []byte) ([]byte, error)
func (*PrivateKey) SignWithOpts ¶
func (*PrivateKey) String ¶
func (sk *PrivateKey) String() (string, error)
func (*PrivateKey) ToStandardKey ¶
func (sk *PrivateKey) ToStandardKey() crypto.PrivateKey
func (*PrivateKey) Type ¶
func (sk *PrivateKey) Type() bccrypto.KeyType
Click to show internal directories.
Click to hide internal directories.