ed25519

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: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PRIVKEY_SIZE   = ed25519.PrivateKeySize
	PUBKEY_SIZE    = ed25519.PublicKeySize
	SEED_SIZE      = 32
	SIGNATURE_SIZE = ed25519.SignatureSize
)

Variables

This section is empty.

Functions

func GenerateKeypairFromPassword

func GenerateKeypairFromPassword(password string) (*PrivateKey, *PublicKey)

func GenerateKeypairFromSeed

func GenerateKeypairFromSeed(seed []byte) (*PrivateKey, *PublicKey)

Types

type PrivateKey

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

func NewPrivateKey

func NewPrivateKey(inner ed25519.PrivateKey) *PrivateKey

func (*PrivateKey) Bytes

func (priv *PrivateKey) Bytes() []byte

func (*PrivateKey) FromBytes

func (priv *PrivateKey) FromBytes(p []byte) error

func (*PrivateKey) FromString

func (priv *PrivateKey) FromString(str string) error

func (*PrivateKey) IsPrivateKey

func (_ *PrivateKey) IsPrivateKey()

func (*PrivateKey) MarshalJSON

func (priv *PrivateKey) MarshalJSON() ([]byte, error)

func (*PrivateKey) Public

func (priv *PrivateKey) Public() crypto.PublicKey

func (*PrivateKey) Sign

func (priv *PrivateKey) Sign(message []byte) crypto.Signature

func (*PrivateKey) String

func (priv *PrivateKey) String() string

type PublicKey

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

func NewPublicKey

func NewPublicKey(inner ed25519.PublicKey) *PublicKey

func (*PublicKey) Bytes

func (pub *PublicKey) Bytes() []byte

func (*PublicKey) Equals

func (pub *PublicKey) Equals(other crypto.PublicKey) bool

func (*PublicKey) FromBytes

func (pub *PublicKey) FromBytes(p []byte) error

func (*PublicKey) FromString

func (pub *PublicKey) FromString(str string) error

func (*PublicKey) IsPublicKey

func (_ *PublicKey) IsPublicKey()

Public Key

func (*PublicKey) MarshalJSON

func (pub *PublicKey) MarshalJSON() ([]byte, error)

func (*PublicKey) String

func (pub *PublicKey) String() string

func (*PublicKey) UnmarshalJSON

func (pub *PublicKey) UnmarshalJSON(inner []byte) error

func (*PublicKey) Verify

func (pub *PublicKey) Verify(message []byte, sig crypto.Signature) bool

type Signature

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

func NewSignature

func NewSignature(inner []byte) *Signature

func (*Signature) Bytes

func (sig *Signature) Bytes() []byte

func (*Signature) Equals

func (sig *Signature) Equals(other crypto.Signature) bool

func (*Signature) FromBytes

func (sig *Signature) FromBytes(p []byte) error

func (*Signature) FromString

func (sig *Signature) FromString(str string) error

func (*Signature) IsSignature

func (_ *Signature) IsSignature()

func (*Signature) MarshalJSON

func (sig *Signature) MarshalJSON() ([]byte, error)

func (*Signature) String

func (sig *Signature) String() string

func (*Signature) UnmarshalJSON

func (sig *Signature) UnmarshalJSON(inner []byte) error

Jump to

Keyboard shortcuts

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