Documentation ¶
Index ¶
- func AES256GCMDecrypt(cipheredText, key, nonce, tag []byte) ([]byte, error)
- func AES256GCMMEncrypt(plainText, key []byte) ([]byte, []byte)
- func BIP32Path(keys []uint32) string
- func DecryptEntry(content, key string) (string, error)
- func EncryptEntry(content, key string) []byte
- func EncryptStorage(s Storage, key string) []byte
- func GenerateRandomBytes(n int) ([]byte, error)
- func GetFileEncKey(masterKey string) (string, string, string)
- func PNGToString(filename string) ([]byte, error)
- func StringToBIP32Path(str string) []uint32
- func URIToIdentity(uri string) types.IdentityType
- func ValidBIP32(path string) bool
- type Client
- func (c *Client) ButtonAck() []byte
- func (c *Client) Call(msg []byte) (string, uint16)
- func (c *Client) ChangePin() []byte
- func (c *Client) CipherKeyValue(encrypt bool, key string, value []byte, address []uint32, iv []byte, ...) []byte
- func (c *Client) ClearSession() []byte
- func (c *Client) CloseTransport()
- func (c *Client) DecryptMessage(path string, nonce, message, hmac []byte) []byte
- func (c *Client) EncryptMessage(pubkey, message string, displayOnly bool, path, coinName string) []byte
- func (c *Client) EntropyAck(entropy []byte) []byte
- func (c *Client) EstimateTxSize(outputsCount, inputsCount uint32, coinName string) []byte
- func (c *Client) EthereumGetAddress(addressN []uint32, showDisplay bool) []byte
- func (c *Client) FirmwareErase() []byte
- func (c *Client) FirmwareUpload(payload []byte) []byte
- func (c *Client) GetAddress(addressN []uint32, showDisplay bool, coinName string) []byte
- func (c *Client) GetECDHSessionKey(uri string, index uint32, peerPublicKey []byte, ecdsaCurveName string) []byte
- func (c *Client) GetEntropy(size uint32) []byte
- func (c *Client) GetEntryNonce(title, username, nonce string) []byte
- func (c *Client) GetFeatures() []byte
- func (c *Client) GetMasterKey() []byte
- func (c *Client) GetPublicKey(address []uint32) []byte
- func (c *Client) Header(msgType messages.MessageType, msg []byte) []byte
- func (c *Client) Initialize() []byte
- func (c *Client) LoadDevice(mnemonic string, passphraseProtection bool, label, pin string, ...) []byte
- func (c *Client) PassphraseAck(str string) []byte
- func (c *Client) PinMatrixAck(str string) []byte
- func (c *Client) Ping(str string, pinProtection, passphraseProtection, buttonProtection bool) []byte
- func (c *Client) Read() (string, uint16)
- func (c *Client) ReadUntil() (string, uint16)
- func (c *Client) RecoveryDevice(wordCount uint32, passphraseProtection, pinProtection bool, label string, ...) []byte
- func (c *Client) ResetDevice(displayRandom bool, strength uint32, passphraseProtection, pinProtection bool, ...) []byte
- func (c *Client) SetEntryNonce(title, username, nonce string) []byte
- func (c *Client) SetHomescreen(homescreen []byte) []byte
- func (c *Client) SetLabel(label string) []byte
- func (c *Client) SetTransport(t transport.Transport)
- func (c *Client) SetU2FCounter(U2FCounter uint32) []byte
- func (c *Client) SignIdentity(uri string, challengeHidden []byte, challengeVisual string, index uint32) []byte
- func (c *Client) SignMessage(message []byte) []byte
- func (c *Client) SignTx(outputsCount, inputsCount uint32, coinName string, version, lockTime uint32) []byte
- func (c *Client) TxAck(tx types.TransactionType) []byte
- func (c *Client) VerifyMessage(address, signature string, message []byte) []byte
- func (c *Client) WipeDevice() []byte
- func (c *Client) WordAck(str string) []byte
- type Config
- type EncryptedData
- type Entry
- type Storage
- type Tag
- type TxRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AES256GCMDecrypt ¶
func AES256GCMMEncrypt ¶
func DecryptEntry ¶
func EncryptEntry ¶
func EncryptStorage ¶
func GenerateRandomBytes ¶
func PNGToString ¶
func StringToBIP32Path ¶
func URIToIdentity ¶
func URIToIdentity(uri string) types.IdentityType
func ValidBIP32 ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CipherKeyValue ¶
func (*Client) ClearSession ¶
func (*Client) CloseTransport ¶
func (c *Client) CloseTransport()
func (*Client) DecryptMessage ¶
func (*Client) EncryptMessage ¶
func (*Client) EntropyAck ¶
func (*Client) EstimateTxSize ¶
func (*Client) EthereumGetAddress ¶
func (*Client) FirmwareErase ¶
func (*Client) FirmwareUpload ¶
func (*Client) GetAddress ¶
func (*Client) GetECDHSessionKey ¶
func (*Client) GetEntropy ¶
func (*Client) GetEntryNonce ¶
func (*Client) GetFeatures ¶
func (*Client) GetMasterKey ¶
func (*Client) GetPublicKey ¶
func (*Client) Initialize ¶
func (*Client) LoadDevice ¶
func (*Client) PassphraseAck ¶
func (*Client) PinMatrixAck ¶
func (*Client) RecoveryDevice ¶
func (*Client) ResetDevice ¶
func (*Client) SetEntryNonce ¶
func (*Client) SetHomescreen ¶
func (*Client) SetTransport ¶
func (*Client) SetU2FCounter ¶
func (*Client) SignIdentity ¶
func (*Client) SignMessage ¶
func (*Client) VerifyMessage ¶
func (*Client) WipeDevice ¶
type EncryptedData ¶
func (EncryptedData) MarshalJSON ¶
func (e EncryptedData) MarshalJSON() ([]byte, error)
TPM uses []int instead of []byte
type Entry ¶
type Entry struct { Title string `json:"title"` Username string `json:"username"` Nonce string `json:"nonce"` Note string `json:"note"` Password EncryptedData `json:"password"` SafeNote EncryptedData `json:"safe_note"` Tags []int `json:"tags"` }
type Storage ¶
type Storage struct { Version string `json:"version"` Config Config `json:"config"` Tags map[string]Tag `json:"tags"` Entries map[string]Entry `json:"entries"` }
func DecryptStorage ¶
type TxRequest ¶
type TxRequest struct { Details *types.TxRequestDetailsType `json:"details,omitempty"` Type types.RequestType `json:"type,omitempty"` }
Click to show internal directories.
Click to hide internal directories.