Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PrivateKey ¶
type PrivateKey struct {
// contains filtered or unexported fields
}
PrivateKey based on the secp256k1 curve
func GenerateKey ¶ added in v0.0.43
func GenerateKey(rand io.Reader) (*PrivateKey, error)
func PrivateKeyFromBytes ¶
func PrivateKeyFromBytes(pk []byte) (*PrivateKey, error)
PrivateKeyFromBytes get a private key from []byte
func PrivateKeyFromECDSA ¶
func PrivateKeyFromECDSA(pk ecdsa.PrivateKey) PrivateKey
PrivateKeyFromECDSA get a private key from an ecdsa.PrivateKey
func (PrivateKey) Bytes ¶
func (pk PrivateKey) Bytes() []byte
Bytes returns the byte representation of the private key
func (PrivateKey) ECDSA ¶
func (pk PrivateKey) ECDSA() (*ecdsa.PrivateKey, error)
ECDSA returns an ECDSA representation of the private key.
func (PrivateKey) ECIES ¶
func (pk PrivateKey) ECIES() *ecies.PrivateKey
ECIES returns an ECIES representation of the private key.
func (PrivateKey) Kind ¶ added in v0.0.38
func (pk PrivateKey) Kind() string
Kind is the type of private key.
func (PrivateKey) PublicKey ¶
func (pk PrivateKey) PublicKey() crypto.PublicKey
PublicKey return the public key that is derived from the private key
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
PublicKey based on the secp256k1 curve
func (PublicKey) CompressedBytes ¶ added in v0.0.43
Click to show internal directories.
Click to hide internal directories.