Documentation ¶
Index ¶
- Variables
- func AddKeyFromRecord(record passvault.PasswordRecord, name string, password string, uses int, ...) (err error)
- func DecryptKey(in []byte, name string, rsaEncryptedKey []byte) (out []byte, err error)
- func EncryptKey(in []byte, name string, override []byte) (out []byte, err error)
- func FlushCache()
- func GetSummary() map[string]ActiveUser
- func Refresh()
- type ActiveUser
Constants ¶
This section is empty.
Variables ¶
View Source
var UserKeys map[string]ActiveUser = make(map[string]ActiveUser)
UserKeys is the set of decrypted keys in memory, indexed by name.
Functions ¶
func AddKeyFromRecord ¶
func AddKeyFromRecord(record passvault.PasswordRecord, name string, password string, uses int, durationString string) (err error)
AddKeyFromRecord decrypts a key for a given record and adds it to the cache.
func DecryptKey ¶
DecryptKey decrypts a 16 byte key using the key corresponding to the name parameter for AES keys, the cached AES key is used directly to decrypt in for RSA keys, the cached RSA key is used to decrypt the rsaEncryptedKey which is then used to decrypt the input buffer.
func EncryptKey ¶
EncryptKey encrypts a 16 byte key using the cached key corresponding to name. For AES keys, use the cached key. For RSA keys, the cache is not necessary use the override key instead.
func GetSummary ¶
func GetSummary() map[string]ActiveUser
GetSummary returns the list of active user keys.
Types ¶
Click to show internal directories.
Click to hide internal directories.