Rekey comment
This commit is contained in:
parent
aa98ef0e5e
commit
8a273d3310
|
@ -763,6 +763,9 @@ func (cps *CwtchProfileStorage) Delete() {
|
|||
}
|
||||
}
|
||||
|
||||
// Rekey re-encrypts the datastore with the new key.
|
||||
// **note* this is technically a very dangerous API and should only be called after
|
||||
// checks on the current password and the derived new password.
|
||||
func (cps *CwtchProfileStorage) Rekey(newkey [32]byte) error {
|
||||
// PRAGMA queries don't allow subs...
|
||||
_, err := cps.db.Exec(fmt.Sprintf(`PRAGMA rekey="x'%x'";`, newkey))
|
||||
|
|
Loading…
Reference in New Issue