signed

package
v0.0.0-...-97057f0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInput = errors.New("signed: invalid input")
	ErrSign  = errors.New("signed: signature check failed")
)
View Source
var (
	ErrInvalidPublicKeySize  = errors.New("signed: invalid public key size")
	ErrInvalidPrivateKeySize = errors.New("signed: invalid private key size")
)

Functions

This section is empty.

Types

type Coder

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

func NewCoder

func NewCoder(publicKey, privateKey []byte) (*Coder, error)

func NewCoder64

func NewCoder64(publicKey64, privateKey64 string) (*Coder, error)

func NewFileCoder64

func NewFileCoder64(publicKeyFile, privateKeyFile string) (*Coder, error)

func (*Coder) Decode

func (c *Coder) Decode(input []byte) ([]byte, error)

func (*Coder) Encode

func (c *Coder) Encode(input []byte) []byte

type KeyPair

type KeyPair struct {
	PublicKey  string
	PrivateKey string
}

func GenerateNewKeyPair

func GenerateNewKeyPair() (*KeyPair, error)

Jump to

Keyboard shortcuts

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