Documentation ¶
Index ¶
- Constants
- func NewPrivateKey(p11 *P11Handle, pk bccrypto.PublicKey) (bccrypto.PrivateKey, error)
- type ECDSAPrivateKey
- func (sk *ECDSAPrivateKey) Bytes() ([]byte, error)
- func (sk *ECDSAPrivateKey) PublicKey() bccrypto.PublicKey
- func (sk *ECDSAPrivateKey) Sign(data []byte) ([]byte, error)
- func (sk *ECDSAPrivateKey) SignWithOpts(msg []byte, opts *bccrypto.SignOpts) ([]byte, error)
- func (sk *ECDSAPrivateKey) String() (string, error)
- func (sk *ECDSAPrivateKey) ToStandardKey() crypto.PrivateKey
- func (sk *ECDSAPrivateKey) Type() bccrypto.KeyType
- type P11Handle
- type RSAPrivateKey
- func (sk *RSAPrivateKey) Bytes() ([]byte, error)
- func (sk *RSAPrivateKey) PublicKey() bccrypto.PublicKey
- func (sk *RSAPrivateKey) Sign(data []byte) ([]byte, error)
- func (sk *RSAPrivateKey) SignWithOpts(msg []byte, opts *bccrypto.SignOpts) ([]byte, error)
- func (sk *RSAPrivateKey) String() (string, error)
- func (sk *RSAPrivateKey) ToStandardKey() crypto.PrivateKey
- func (sk *RSAPrivateKey) Type() bccrypto.KeyType
Constants ¶
View Source
const ( CKM_VENDOR_DEFINED = 0x80000000 CKM_SM2 = CKM_VENDOR_DEFINED + 0x8000 CKM_SM3_SM2 = CKM_SM2 + 0x00000100 // SM2-SM3 sign with ASN1 encoding CKM_SM2_SIGN = CKM_SM2 + 0x00000104 // SM2 sign with ASN1 encoding (no SM3 hash) CKM_SM2_SIGN_NO_DER = CKM_SM2 + 0x00000105 // SM2 sign with plain R|S concatenation (no SM3 hash) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ECDSAPrivateKey ¶
type ECDSAPrivateKey struct {
// contains filtered or unexported fields
}
func (*ECDSAPrivateKey) Bytes ¶
func (sk *ECDSAPrivateKey) Bytes() ([]byte, error)
func (*ECDSAPrivateKey) PublicKey ¶
func (sk *ECDSAPrivateKey) PublicKey() bccrypto.PublicKey
func (*ECDSAPrivateKey) Sign ¶
func (sk *ECDSAPrivateKey) Sign(data []byte) ([]byte, error)
func (*ECDSAPrivateKey) SignWithOpts ¶
func (*ECDSAPrivateKey) String ¶
func (sk *ECDSAPrivateKey) String() (string, error)
func (*ECDSAPrivateKey) ToStandardKey ¶
func (sk *ECDSAPrivateKey) ToStandardKey() crypto.PrivateKey
func (*ECDSAPrivateKey) Type ¶
func (sk *ECDSAPrivateKey) Type() bccrypto.KeyType
type RSAPrivateKey ¶
type RSAPrivateKey struct {
// contains filtered or unexported fields
}
func (*RSAPrivateKey) Bytes ¶
func (sk *RSAPrivateKey) Bytes() ([]byte, error)
func (*RSAPrivateKey) PublicKey ¶
func (sk *RSAPrivateKey) PublicKey() bccrypto.PublicKey
func (*RSAPrivateKey) Sign ¶
func (sk *RSAPrivateKey) Sign(data []byte) ([]byte, error)
func (*RSAPrivateKey) SignWithOpts ¶
func (*RSAPrivateKey) String ¶
func (sk *RSAPrivateKey) String() (string, error)
func (*RSAPrivateKey) ToStandardKey ¶
func (sk *RSAPrivateKey) ToStandardKey() crypto.PrivateKey
func (*RSAPrivateKey) Type ¶
func (sk *RSAPrivateKey) Type() bccrypto.KeyType
Click to show internal directories.
Click to hide internal directories.