ed25519

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ED25519_PEM_PUBLIC_KEY_TAG = "PUBLIC KEY"
View Source
const ED25519_PEM_SECRET_KEY_TAG = "PRIVATE KEY"

Variables

This section is empty.

Functions

func AccountHash

func AccountHash(pubKey []byte) string

AccountHex generates the accountHex for the Ed25519 public key

func AccountHex

func AccountHex(publicKey []byte) string

AccountHex generates the accountHex for the Ed25519 public key

func Ed25519FromSeed

func Ed25519FromSeed(seed []byte) keypair.KeyPair

Ed25519FromSeed creates a new keypair from the provided Ed25519 seed

func Ed25519Random

func Ed25519Random() (keypair.KeyPair, error)

Ed25519Random creates a random Ed25519 keypair

func ExportPrivateKeyInPem

func ExportPrivateKeyInPem(privateKey string) []byte

ExportPrivateKeyInPem expects the private key encoded in pem

func ExportPublicKeyInPem

func ExportPublicKeyInPem(publicKey string) []byte

ExportPublicKeyInPem exports the public key encoded in pem

func ParseKey

func ParseKey(bytes []byte, from int, to int) ([]byte, error)

func ParseKeyFiles

func ParseKeyFiles(pubKeyPath, privKeyPath string) (keypair.KeyPair, error)

ParseKeyFiles parses the key pair from publicKey file and privateKey file

func ParseKeyPair

func ParseKeyPair(publicKey []byte, privateKey []byte) keypair.KeyPair

ParseKeyPair constructs keyPair from a public key and private key

func ParsePrivateKey

func ParsePrivateKey(bytes []byte) ([]byte, error)

func ParsePrivateKeyFile

func ParsePrivateKeyFile(path string) ([]byte, error)

func ParsePublicKey

func ParsePublicKey(bytes []byte) ([]byte, error)

func ParsePublicKeyFile

func ParsePublicKeyFile(path string) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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