Documentation ¶
Overview ¶
Package crypt is the combination of a BlockCrypt and buf.Byte that stares encrypted and returns decrypted data if a BlockCrypt is loaded.
This is used by the wallet to keep private keys from being copied inside the memory of the application when they are not being worked on.
If there is no BlockCrypt the same code can be used but the data is not protected. This is for the case of a user who does not encrypt their wallet, or has other measures such as VM isolation to protect the wallet process's memory.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Crypt ¶
type Crypt struct { *buf.Byte BC *blockcrypt.BlockCrypt }
Crypt is a generic structure for storing bytes encrypted and reading them to a another buffer, using a BlockCrypt AES-GCM 256 cipher
func (*Crypt) WithBC ¶
func (r *Crypt) WithBC(bc *blockcrypt.BlockCrypt) *Crypt
WithBC loads a crypter into the Crypt