Documentation ¶
Index ¶
- Constants
- func GenerateKeypairFromPassword(password string) (*PrivateKey, *PublicKey)
- func GenerateKeypairFromSeed(seed []byte) (*PrivateKey, *PublicKey)
- type PrivateKey
- func (priv *PrivateKey) Bytes() []byte
- func (priv *PrivateKey) FromBytes(p []byte) error
- func (priv *PrivateKey) FromString(str string) error
- func (_ *PrivateKey) IsPrivateKey()
- func (priv *PrivateKey) MarshalJSON() ([]byte, error)
- func (priv *PrivateKey) Public() crypto.PublicKey
- func (priv *PrivateKey) Sign(message []byte) crypto.Signature
- func (priv *PrivateKey) String() string
- type PublicKey
- func (pub *PublicKey) Bytes() []byte
- func (pub *PublicKey) Equals(other crypto.PublicKey) bool
- func (pub *PublicKey) FromBytes(p []byte) error
- func (pub *PublicKey) FromString(str string) error
- func (_ *PublicKey) IsPublicKey()
- func (pub *PublicKey) MarshalJSON() ([]byte, error)
- func (pub *PublicKey) String() string
- func (pub *PublicKey) UnmarshalJSON(inner []byte) error
- func (pub *PublicKey) Verify(message []byte, sig crypto.Signature) bool
- type Signature
- func (sig *Signature) Bytes() []byte
- func (sig *Signature) Equals(other crypto.Signature) bool
- func (sig *Signature) FromBytes(p []byte) error
- func (sig *Signature) FromString(str string) error
- func (_ *Signature) IsSignature()
- func (sig *Signature) MarshalJSON() ([]byte, error)
- func (sig *Signature) String() string
- func (sig *Signature) UnmarshalJSON(inner []byte) error
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) String ¶
func (priv *PrivateKey) String() string
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
func NewPublicKey ¶
func (*PublicKey) FromString ¶
func (*PublicKey) MarshalJSON ¶
func (*PublicKey) UnmarshalJSON ¶
type Signature ¶
type Signature struct {
// contains filtered or unexported fields
}
func NewSignature ¶
func (*Signature) FromString ¶
func (*Signature) IsSignature ¶
func (_ *Signature) IsSignature()
func (*Signature) MarshalJSON ¶
func (*Signature) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.