crypt

package
v0.0.0-...-1267fb5 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2017 License: MIT Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Version uint64
	Stream  uint64
	Ripe    Ripe
}

func NewAddress

func NewAddress(text string) (*Address, error)

func (Address) String

func (a Address) String() string

func (Address) Tag

func (a Address) Tag() Tag

func (Address) XKey

func (a Address) XKey() PrivateKey

type PrivateCombo

type PrivateCombo struct {
	SigningKey    PrivateKey
	EncryptionKey PrivateKey
}

func DeterministicPrivateCombo

func DeterministicPrivateCombo(name string) *PrivateCombo

func RandomPrivateCombo

func RandomPrivateCombo() *PrivateCombo

func (*PrivateCombo) PublicCombo

func (c *PrivateCombo) PublicCombo() *PublicCombo

func (*PrivateCombo) Ripe

func (c *PrivateCombo) Ripe() Ripe

type PrivateKey

type PrivateKey []byte

func NewPrivateKey

func NewPrivateKey(text string) (PrivateKey, error)

func RandomPrivateKey

func RandomPrivateKey() PrivateKey

func (PrivateKey) Decrypt

func (p PrivateKey) Decrypt(encrypted []byte) ([]byte, error)

func (PrivateKey) PublicKey

func (p PrivateKey) PublicKey() PublicKey

func (PrivateKey) Sign

func (p PrivateKey) Sign(data []byte) []byte

func (PrivateKey) String

func (p PrivateKey) String() string

type PublicCombo

type PublicCombo struct {
	SigningKey    PublicKey
	EncryptionKey PublicKey
}

func (*PublicCombo) Ripe

func (c *PublicCombo) Ripe() Ripe

type PublicKey

type PublicKey []byte

func (PublicKey) Encrypt

func (p PublicKey) Encrypt(message []byte) []byte

func (PublicKey) Verify

func (p PublicKey) Verify(data, signature []byte) error

func (PublicKey) VerifyWithAlgorithm

func (p PublicKey) VerifyWithAlgorithm(data, signature []byte) (string, error)

type Ripe

type Ripe []byte

type Tag

type Tag []byte

func (Tag) String

func (t Tag) String() string

Jump to

Keyboard shortcuts

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