ecdsa

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportECPrivateKey

func ExportECPrivateKey(privateKey *ecdsa.PrivateKey) ([]byte, error)

ExportECPrivateKey converts private key to []byte.

func ExportECPublicKey

func ExportECPublicKey(publicKey *ecdsa.PublicKey) ([]byte, error)

ExportECPublicKey converts public key to []byte.

func ParseECPrivateKeyFromPEM

func ParseECPrivateKeyFromPEM(key []byte) (*ecdsa.PrivateKey, error)

ParseECPrivateKeyFromPEM Parse PEM encoded Elliptic Curve Private Key Structure.

func ParseECPublicKeyFromPEM

func ParseECPublicKeyFromPEM(key []byte) (*ecdsa.PublicKey, error)

ParseECPublicKeyFromPEM Parse PEM encoded PKCS1 or PKCS8 public key.

Types

type KeyPair

type KeyPair struct {
	Private *ecdsa.PrivateKey
	Public  *ecdsa.PublicKey
}

KeyPair is RSA key pair.

func GenerateKeyPair

func GenerateKeyPair() (KeyPair, error)

GenerateKeyPair returns private & public keys.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL