Documentation
¶
Index ¶
Constants ¶
View Source
const PublicKeySize = 33
Variables ¶
This section is empty.
Functions ¶
func NewPemPair ¶
func PemToPrivateKey ¶
func PrivateKeyToPem ¶
func PublicKeyToPem ¶
Types ¶
type PrivateKey ¶
type PrivateKey struct {
// contains filtered or unexported fields
}
func GeneratePrivateKey ¶
func GeneratePrivateKey() (PrivateKey, error)
func NewPrivateKeyFromBytes ¶
func NewPrivateKeyFromBytes(key []byte) (PrivateKey, error)
NewPrivateKeyFromBytes creates a secp256k1 PrivateKey from raw bytes
func NewPrivateKeyFromHex ¶
func NewPrivateKeyFromHex(key string) (PrivateKey, error)
NewPrivateKeyFromHex creates a secp256k1 PrivateKey from a hex string
func NewPrivateKeyFromPem ¶
func NewPrivateKeyFromPem(content []byte) (PrivateKey, error)
func (PrivateKey) PublicKeyBytes ¶
func (v PrivateKey) PublicKeyBytes() []byte
func (PrivateKey) ToPem ¶
func (v PrivateKey) ToPem() ([]byte, error)
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
func NewPublicKey ¶
Click to show internal directories.
Click to hide internal directories.