Documentation ¶
Index ¶
- func Generate() (*ecdsa.PrivateKey, error)
- func MarshalPKCS8PrivateKey(key *ecdsa.PrivateKey) ([]byte, error)
- func MarshalPKIXPublicKey(key *ecdsa.PublicKey) ([]byte, error)
- func ParsePKCS8PrivateKey(der []byte) (*ecdsa.PrivateKey, error)
- func ParsePKIXPublicKey(der []byte) (*ecdsa.PublicKey, error)
- type Secp256k1Algorithm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
func Generate() (*ecdsa.PrivateKey, error)
func MarshalPKCS8PrivateKey ¶
func MarshalPKCS8PrivateKey(key *ecdsa.PrivateKey) ([]byte, error)
marshal only secp256k1 ecdsa key, use x509.MarshalPKCS8PrivateKey for others
func ParsePKCS8PrivateKey ¶
func ParsePKCS8PrivateKey(der []byte) (*ecdsa.PrivateKey, error)
Types ¶
type Secp256k1Algorithm ¶
type Secp256k1Algorithm struct {
// contains filtered or unexported fields
}
func (*Secp256k1Algorithm) Name ¶
func (a *Secp256k1Algorithm) Name() string
func (*Secp256k1Algorithm) Sign ¶
func (a *Secp256k1Algorithm) Sign(privateKey []byte, data []byte) ([]byte, error)
func (*Secp256k1Algorithm) ValidateSignature ¶
func (a *Secp256k1Algorithm) ValidateSignature(publicKey []byte, signature []byte, data []byte) error
Click to show internal directories.
Click to hide internal directories.