Documentation ¶
Index ¶
- func New(keyType crypto.KeyType) (crypto.PrivateKey, error)
- type PrivateKey
- func (sk *PrivateKey) Bytes() ([]byte, error)
- func (sk *PrivateKey) PublicKey() crypto.PublicKey
- func (sk *PrivateKey) Sign(digest []byte) ([]byte, error)
- func (sk *PrivateKey) SignWithOpts(msg []byte, opts *crypto.SignOpts) ([]byte, error)
- func (sk *PrivateKey) String() (string, error)
- func (sk *PrivateKey) ToStandardKey() crypto2.PrivateKey
- func (sk *PrivateKey) Type() crypto.KeyType
- type PublicKey
- func (pk *PublicKey) Bytes() ([]byte, error)
- func (pk *PublicKey) String() (string, error)
- func (pk *PublicKey) ToStandardKey() crypto2.PublicKey
- func (pk *PublicKey) Type() crypto.KeyType
- func (pk *PublicKey) Verify(digest []byte, sig []byte) (bool, error)
- func (pk *PublicKey) VerifyWithOpts(msg []byte, sig []byte, opts *crypto.SignOpts) (bool, error)
- type Sig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PrivateKey ¶
type PrivateKey struct {
K *ecdsa.PrivateKey
}
func (*PrivateKey) Bytes ¶
func (sk *PrivateKey) Bytes() ([]byte, error)
func (*PrivateKey) PublicKey ¶
func (sk *PrivateKey) PublicKey() crypto.PublicKey
func (*PrivateKey) Sign ¶
func (sk *PrivateKey) Sign(digest []byte) ([]byte, error)
func (*PrivateKey) SignWithOpts ¶
func (*PrivateKey) String ¶
func (sk *PrivateKey) String() (string, error)
func (*PrivateKey) ToStandardKey ¶
func (sk *PrivateKey) ToStandardKey() crypto2.PrivateKey
func (*PrivateKey) Type ¶
func (sk *PrivateKey) Type() crypto.KeyType
type PublicKey ¶
Click to show internal directories.
Click to hide internal directories.