esign

package module
v0.0.0-...-921dacf Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadPrivateKey

func LoadPrivateKey(location string) (*[64]byte, error)

Load private key from generic file and provide a pointer to it

func LoadPrivateKeyFromBase64

func LoadPrivateKeyFromBase64(encodedKey string) *[64]byte

Load and decode private key from base64 string and provide a pointer to it

func LoadPublicKey

func LoadPublicKey(location string) (*[32]byte, error)

Load public key from generic file and provide a pointer to it

func LoadPublicKeyFromBase64

func LoadPublicKeyFromBase64(encodedKey string) *[32]byte

Load and decode public key from base64 string and provide a pointer to it

func Verify

func Verify(file string) *verifier

Checks if file exists and generates checksum and provide additionally a new verifier object to use func chaining

Types

type Keystore

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

func CreateKeyPair

func CreateKeyPair() *Keystore

Create Ed25519 key pair

func (*Keystore) Save

func (keystore *Keystore) Save(destLocation string)

Saves public and private key to desired destination

type Signature

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

func Sign

func Sign(file string, privateKey *[64]byte) *Signature

Sign a file with ed25519 assuming that the hash from the file and a private key will be provided

func (*Signature) Save

func (signature *Signature) Save(destLocation string)

The signature will be stored to provided destination location

Jump to

Keyboard shortcuts

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