Documentation ¶
Index ¶
- Variables
- func ExportPrivateKey(privateKey *ecdsa.PrivateKey) (string, error)
- func ExportPublicKey(publicKey *ecdsa.PublicKey) (string, error)
- func GeneratePrivateKey() (*ecdsa.PrivateKey, error)
- func ImportPrivateKey(pemEncoded string) (*ecdsa.PrivateKey, error)
- func ImportPublicKey(pemPubEncoded string) (*ecdsa.PublicKey, error)
- func Sign(data []byte, key *ecdsa.PrivateKey) ([]byte, error)
- func Verify(seed []byte, signatureRaw []byte, pubKey string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var P256Curve = elliptic.P256()
Functions ¶
func ExportPrivateKey ¶
func ExportPrivateKey(privateKey *ecdsa.PrivateKey) (string, error)
Helper-function for exporting ecdsa.PrivateKey to PEM string
func ExportPublicKey ¶
Helper-function for exporting ecdsa.PublicKey from PEM string
func GeneratePrivateKey ¶
func GeneratePrivateKey() (*ecdsa.PrivateKey, error)
func ImportPrivateKey ¶
func ImportPrivateKey(pemEncoded string) (*ecdsa.PrivateKey, error)
Helper-function for importing ecdsa.PrivateKey from PEM string
func ImportPublicKey ¶
Helper-function for importing ecdsa.PublicKey from PEM string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.