Documentation ¶
Index ¶
- Constants
- type Address
- func (a *Address) MarshalBinary() ([]byte, error)
- func (a *Address) MarshalText() ([]byte, error)
- func (a Address) MarshalYAML() (interface{}, error)
- func (a *Address) UnmarshalBinary(data []byte) error
- func (a *Address) UnmarshalText(text []byte) error
- func (a *Address) UnmarshalYAML(unmarshal func(interface{}) error) error
- type EncryptedPrivateKey
- func (e *EncryptedPrivateKey) HasAccess(password *memguard.LockedBuffer, salt, nonce []byte) bool
- func (e *EncryptedPrivateKey) MarshalBinary() ([]byte, error)
- func (e *EncryptedPrivateKey) MarshalText() ([]byte, error)
- func (e EncryptedPrivateKey) MarshalYAML() (interface{}, error)
- func (e *EncryptedPrivateKey) PrivateKeyBytesInClear(password *memguard.LockedBuffer, salt, nonce []byte) (*memguard.LockedBuffer, error)
- func (e *EncryptedPrivateKey) PrivateKeyTextInClear(password *memguard.LockedBuffer, salt, nonce []byte) (*memguard.LockedBuffer, error)
- func (e *EncryptedPrivateKey) PublicKey(password *memguard.LockedBuffer, salt, nonce []byte) (*PublicKey, error)
- func (e *EncryptedPrivateKey) Sign(password *memguard.LockedBuffer, salt, nonce, data []byte) ([]byte, error)
- func (e *EncryptedPrivateKey) SignWithPrivateKey(privateKey *memguard.LockedBuffer, data []byte) []byte
- func (e *EncryptedPrivateKey) UnmarshalBinary(data []byte) error
- func (e *EncryptedPrivateKey) UnmarshalText(text []byte) error
- func (e *EncryptedPrivateKey) UnmarshalYAML(unmarshal func(interface{}) error) error
- type PublicKey
- func (p *PublicKey) MarshalBinary() ([]byte, error)
- func (p *PublicKey) MarshalText() ([]byte, error)
- func (p PublicKey) MarshalYAML() (interface{}, error)
- func (p *PublicKey) UnmarshalBinary(data []byte) error
- func (p *PublicKey) UnmarshalText(text []byte) error
- func (pk *PublicKey) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (p *PublicKey) VerifySignature(data, signature []byte) bool
Constants ¶
const (
AddressLastVersion = 0x00
)
const (
// EncryptedPrivateKeyLastVersion is the last version of the encrypted private key.
EncryptedPrivateKeyLastVersion = 0x00
)
const (
PublicKeyLastVersion = 0x00
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
Address wraps the Object type to provide additional functionalities.
func NewAddressFromPublicKey ¶
NewAddressFromPublicKey creates a new Address from a given PublicKey.
func (*Address) MarshalBinary ¶
MarshalBinary overloads the BinaryMarshaler interface for Address.
func (*Address) MarshalText ¶
MarshalText overloads the TextMarshaler interface for Address.
func (Address) MarshalYAML ¶
Custom YAML marshaller for Address
func (*Address) UnmarshalBinary ¶
UnmarshalBinary overloads the BinaryUnmarshaler interface for Address.
func (*Address) UnmarshalText ¶
UnmarshalText overloads the TextUnmarshaler interface for Address.
func (*Address) UnmarshalYAML ¶
Custom YAML unmarshaller for Address
type EncryptedPrivateKey ¶
func (*EncryptedPrivateKey) HasAccess ¶
func (e *EncryptedPrivateKey) HasAccess(password *memguard.LockedBuffer, salt, nonce []byte) bool
HasAccess returns true if the password is valid for the account. It destroys the password.
func (*EncryptedPrivateKey) MarshalBinary ¶
func (e *EncryptedPrivateKey) MarshalBinary() ([]byte, error)
MarshalBinary overloads the BinaryMarshaler interface for EncryptedPrivateKey.
func (*EncryptedPrivateKey) MarshalText ¶
func (e *EncryptedPrivateKey) MarshalText() ([]byte, error)
MarshalText overloads the TextMarshaler interface for EncryptedPrivateKey.
func (EncryptedPrivateKey) MarshalYAML ¶
func (e EncryptedPrivateKey) MarshalYAML() (interface{}, error)
Custom YAML marshaller for EncryptedPrivateKey
func (*EncryptedPrivateKey) PrivateKeyBytesInClear ¶
func (e *EncryptedPrivateKey) PrivateKeyBytesInClear(password *memguard.LockedBuffer, salt, nonce []byte) (*memguard.LockedBuffer, error)
func (*EncryptedPrivateKey) PrivateKeyTextInClear ¶
func (e *EncryptedPrivateKey) PrivateKeyTextInClear(password *memguard.LockedBuffer, salt, nonce []byte) (*memguard.LockedBuffer, error)
PrivateKeyTextInClear returns the private key in clear. Password is destroyed.
func (*EncryptedPrivateKey) PublicKey ¶
func (e *EncryptedPrivateKey) PublicKey(password *memguard.LockedBuffer, salt, nonce []byte) (*PublicKey, error)
PublicKey returns the public key corresponding to the private key. Password is destroyed.
func (*EncryptedPrivateKey) Sign ¶
func (e *EncryptedPrivateKey) Sign(password *memguard.LockedBuffer, salt, nonce, data []byte) ([]byte, error)
Sign signs the given data using the private key. Password is destroyed.
func (*EncryptedPrivateKey) SignWithPrivateKey ¶
func (e *EncryptedPrivateKey) SignWithPrivateKey(privateKey *memguard.LockedBuffer, data []byte) []byte
SignWithPrivateKey signs the given data using the private key. Private key is destroyed.
func (*EncryptedPrivateKey) UnmarshalBinary ¶
func (e *EncryptedPrivateKey) UnmarshalBinary(data []byte) error
UnmarshalBinary overloads the BinaryUnmarshaler interface for EncryptedPrivateKey.
func (*EncryptedPrivateKey) UnmarshalText ¶
func (e *EncryptedPrivateKey) UnmarshalText(text []byte) error
UnmarshalText overloads the TextUnmarshaler interface for EncryptedPrivateKey.
func (*EncryptedPrivateKey) UnmarshalYAML ¶
func (e *EncryptedPrivateKey) UnmarshalYAML(unmarshal func(interface{}) error) error
Custom YAML unmarshaller for EncryptedPrivateKey
type PublicKey ¶
func (*PublicKey) MarshalBinary ¶
MarshalBinary overloads the BinaryMarshaler interface for PublicKey.
func (*PublicKey) MarshalText ¶
MarshalText overloads the TextMarshaler interface for PublicKey.
func (PublicKey) MarshalYAML ¶
Custom YAML marshaller for PublicKey
func (*PublicKey) UnmarshalBinary ¶
UnmarshalBinary overloads the BinaryUnmarshaler interface for PublicKey.
func (*PublicKey) UnmarshalText ¶
UnmarshalText overloads the TextUnmarshaler interface for PublicKey.
func (*PublicKey) UnmarshalYAML ¶
Custom YAML unmarshaller for PublicKey