Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrivateKey ¶
type PrivateKey struct {
// contains filtered or unexported fields
}
PrivateKey represents a loaded ECDSA private key.
func FromBase64 ¶
func FromBase64(data string) (*PrivateKey, error)
FromBase64 loads an ECDSA private key from a base64 encoded string.
func FromBytes ¶
func FromBytes(data []byte) (*PrivateKey, error)
FromBytes loads an ECDSA private key from PEM data.
func FromFile ¶
func FromFile(file string) (*PrivateKey, error)
FromFile loads an ECDSA private key from a PEM file.
func (*PrivateKey) Bytes ¶
func (p *PrivateKey) Bytes() []byte
Bytes returns the bytes of the ECDSA private key.
func (*PrivateKey) PrivateKey ¶
func (p *PrivateKey) PrivateKey() *ecdsa.PrivateKey
PrivateKey returns the ECDSA private key.
func (*PrivateKey) PublicKey ¶
func (p *PrivateKey) PublicKey() *ecdsa.PublicKey
PublicKey returns the ECDSA public key.
func (*PrivateKey) ToBase64 ¶
func (p *PrivateKey) ToBase64() string
ToBase64 saves the ECDSA private key to a base64 encoded string.
Click to show internal directories.
Click to hide internal directories.