signed

package
v0.0.0-...-377c460 Latest Latest
Warning

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

Go to latest
Published: Jun 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 (
	ErrPublicKeySize  = errors.New("signed: invalid public key size")
	ErrPrivateKeySize = errors.New("signed: invalid private key size")
)

Functions

This section is empty.

Types

type Coder

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

func Generate

func Generate() (*Coder, error)

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

func (*Coder) PrivateKey

func (c *Coder) PrivateKey() Key

func (*Coder) PublicKey

func (c *Coder) PublicKey() Key

type Key

type Key []byte

func (Key) String

func (key Key) String() string

Jump to

Keyboard shortcuts

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