ed25519

package
v0.0.0-...-c11aaf6 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Ed25519PKIXPrivatePrefix = []byte{0x30, 0x2E, 0x02, 0x01, 0x00, 0x30, 0x05, 0x06, 0x03, 0x2B, 0x65, 0x70, 0x04, 0x22, 0x04, 0x20}
View Source
var Ed25519PKIXPublicPrefix = []byte{0x30, 0x2A, 0x30, 0x05, 0x06, 0x03, 0x2B, 0x65, 0x70, 0x03, 0x21, 0x00}

Functions

This section is empty.

Types

type KeyPair

type KeyPair struct {
	// contains filtered or unexported fields
}

func NewKeyPair

func NewKeyPair() (*KeyPair, error)

NewKeyPair generates new ED25519 key pair

func (KeyPair) Clear

func (key KeyPair) Clear()

Clear clears memory storing key pair

func (KeyPair) PrivateKeyBytes

func (key KeyPair) PrivateKeyBytes() []byte

func (KeyPair) PrivateKeyPKIX

func (key KeyPair) PrivateKeyPKIX() []byte

PrivateKeyPKIX private key in PKIX, ASN.1 DER format

func (KeyPair) PrivateKeyPKIXBase64

func (key KeyPair) PrivateKeyPKIXBase64() string

PrivateKeyPKIXBase64 returns private key PKIX, ASN.1 DER in Base64

func (KeyPair) PrivateKeyPKIXPem

func (key KeyPair) PrivateKeyPKIXPem() string

PrivateKeyPKIXPem returns private key ASN.1 DER representation as PEM

func (KeyPair) PublicKeyBytes

func (key KeyPair) PublicKeyBytes() []byte

func (KeyPair) PublicKeyPKIX

func (key KeyPair) PublicKeyPKIX() ([]byte, error)

PublicKeyPKIX returns public key in PKIX, ASN.1 DER format

func (KeyPair) PublicKeyPKIXBase64

func (key KeyPair) PublicKeyPKIXBase64() (string, error)

PublicKeyPKIXBase64 public key in PKIX, ASN.1 DER in Base64

func (KeyPair) PublicKeyPKIXPem

func (key KeyPair) PublicKeyPKIXPem() (string, error)

PublicKeyPKIXPem returns public key in ASN.1 DER representation as PEM

func (KeyPair) ToX25519

func (key KeyPair) ToX25519() []byte

ToX25519 converts to X25519 secret key.

func (KeyPair) ToX25519Base64

func (key KeyPair) ToX25519Base64() string

ToX25519Base64 converts to X25519 secret key encoded as base64.

Jump to

Keyboard shortcuts

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