Documentation ¶
Overview ¶
package filestorage provides a secure on-disk storage of private keys and metadata. Security is enforced by file and directory permissions, much like standard ssh key storage.
Index ¶
Constants ¶
const ( BlockType = "Tendermint Light Client" // PrivExt is the extension for private keys. PrivExt = "tlc" // PubExt is the extensions for public keys. PubExt = "pub" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileStore ¶
type FileStore struct {
// contains filtered or unexported fields
}
func New ¶
New creates an instance of file-based key storage with tight permissions
dir should be an absolute path of a directory owner by this user. It will be created if it doesn't exist already.
func (FileStore) Delete ¶
Delete permanently removes the public and private info for the named key The calling function should provide some security checks first.
func (FileStore) Get ¶
Get loads the info and (encoded) private key from the directory It uses `name` to generate the filename, and returns an error if the files don't exist or are in the incorrect format