github.com/annchain/OG@v0.0.9/common/encryption/vault.go (about) 1 package encryption 2 3 // Vault is the inmemory encrypted storage for private keys 4 // Currently not implemented. 5 type Vault struct { 6 data []byte 7 } 8 9 func NewVault(data []byte) *Vault { 10 return &Vault{ 11 data: data, 12 } 13 } 14 15 func (v *Vault) Fetch() []byte { 16 return v.data 17 } 18 19 func (v *Vault) Dump(filepath string, passphrase string) error { 20 return EncryptFileDummy(filepath, v.data, passphrase) 21 }