Documentation ¶
Index ¶
- func MarshalPrivateKey(key ed25519.PrivateKey) ([]byte, error)
- func UnmarshalPrivateKey(raw Raw) (ed25519.PrivateKey, error)
- type EncryptedP2PKey
- type EncryptedP2PKeyExport
- type Key
- type KeyV2
- func (key KeyV2) GoString() string
- func (key KeyV2) ID() string
- func (key KeyV2) PeerID() PeerID
- func (key KeyV2) PublicKeyHex() string
- func (key KeyV2) Raw() Raw
- func (key KeyV2) String() string
- func (key KeyV2) ToEncryptedJSON(password string, scryptParams utils.ScryptParams) (export []byte, err error)
- type PeerID
- func (p PeerID) MarshalJSON() ([]byte, error)
- func (p *PeerID) MarshalText() ([]byte, error)
- func (p PeerID) Raw() string
- func (p *PeerID) Scan(value interface{}) error
- func (p PeerID) String() string
- func (p *PeerID) UnmarshalJSON(input []byte) error
- func (p *PeerID) UnmarshalString(s string) error
- func (p *PeerID) UnmarshalText(bs []byte) error
- func (p PeerID) Value() (driver.Value, error)
- type PublicKeyBytes
- type Raw
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalPrivateKey ¶ added in v2.9.0
func MarshalPrivateKey(key ed25519.PrivateKey) ([]byte, error)
func UnmarshalPrivateKey ¶ added in v2.9.0
func UnmarshalPrivateKey(raw Raw) (ed25519.PrivateKey, error)
Types ¶
type EncryptedP2PKey ¶
type EncryptedP2PKey struct { ID int32 PeerID PeerID PubKey PublicKeyBytes EncryptedPrivKey []byte CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time }
func (EncryptedP2PKey) Decrypt ¶
func (ep2pk EncryptedP2PKey) Decrypt(auth string) (k Key, err error)
Decrypt returns the PrivateKey in e, decrypted via auth, or an error
func (*EncryptedP2PKey) SetID ¶
func (ep2pk *EncryptedP2PKey) SetID(value string) error
type EncryptedP2PKeyExport ¶
type EncryptedP2PKeyExport struct { KeyType string `json:"keyType"` PublicKey string `json:"publicKey"` PeerID PeerID `json:"peerID"` Crypto keystore.CryptoJSON `json:"crypto"` }
func (EncryptedP2PKeyExport) GetCrypto ¶
func (x EncryptedP2PKeyExport) GetCrypto() keystore.CryptoJSON
type KeyV2 ¶
type KeyV2 struct { PrivKey ed25519.PrivateKey // contains filtered or unexported fields }
func MustNewV2XXXTestingOnly ¶
func (KeyV2) PublicKeyHex ¶
func (KeyV2) ToEncryptedJSON ¶
type PeerID ¶
func MakePeerID ¶
func (PeerID) MarshalJSON ¶
func (*PeerID) MarshalText ¶
func (*PeerID) UnmarshalJSON ¶
func (*PeerID) UnmarshalString ¶
func (*PeerID) UnmarshalText ¶
type PublicKeyBytes ¶
type PublicKeyBytes []byte
PublicKeyBytes is a ed25519.PublicKey
func (PublicKeyBytes) MarshalJSON ¶
func (pkb PublicKeyBytes) MarshalJSON() ([]byte, error)
func (*PublicKeyBytes) Scan ¶
func (pkb *PublicKeyBytes) Scan(value interface{}) error
func (PublicKeyBytes) String ¶
func (pkb PublicKeyBytes) String() string
func (*PublicKeyBytes) UnmarshalJSON ¶
func (pkb *PublicKeyBytes) UnmarshalJSON(input []byte) error
Click to show internal directories.
Click to hide internal directories.