crypto

package
v0.0.0-...-0872f49 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSecret

func GenerateSecret(password string) []byte

Types

type PrivateKey

type PrivateKey interface {
	IsPrivateKey()
	Public() PublicKey
	Sign([]byte) Signature
	String() string
}

type PublicKey

type PublicKey interface {
	IsPublicKey()
	Bytes() []byte
	Equals(PublicKey) bool
	FromBytes([]byte) error
	FromString(string) error
	MarshalJSON() ([]byte, error)
	String() string
	UnmarshalJSON([]byte) error
	Verify([]byte, Signature) bool
}

type Signature

type Signature interface {
	IsSignature()
	Bytes() []byte
	Equals(Signature) bool
	FromBytes([]byte) error
	FromString(string) error
	MarshalJSON() ([]byte, error)
	String() string
	UnmarshalJSON([]byte) error
}

Jump to

Keyboard shortcuts

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