mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-08-28 04:46:41 -04:00
Port to latest libmutton development version & begin migration from GPG to RCW
This commit is contained in:
+4
-4
@@ -22,16 +22,16 @@ func RenameCli(oldLocationIncomplete string) {
|
||||
// EditEntryField edits a field of an entry at targetLocation (user input).
|
||||
func EditEntryField(targetLocation string, hideSecrets bool, field int) {
|
||||
// fetch old entry data (with all required lines present)
|
||||
unencryptedEntry := core.GetOldEntryData(targetLocation, field)
|
||||
unencryptedEntry := core.GetOldEntryData(targetLocation, field, GetRCWPassphrase())
|
||||
|
||||
// edit the field
|
||||
switch field {
|
||||
case 0:
|
||||
unencryptedEntry[field] = string(inputHidden("Password:"))
|
||||
unencryptedEntry[field] = string(GetRCWPassphrase())
|
||||
case 1:
|
||||
unencryptedEntry[field] = input("Username:")
|
||||
case 2:
|
||||
unencryptedEntry[field] = string(inputHidden("TOTP secret:"))
|
||||
unencryptedEntry[field] = string(GetRCWPassphrase())
|
||||
case 3:
|
||||
unencryptedEntry[field] = input("URL:")
|
||||
case 4: // edit notes fields
|
||||
@@ -54,7 +54,7 @@ func EditEntryField(targetLocation string, hideSecrets bool, field int) {
|
||||
// GenUpdate generates a new password for an entry at targetLocation (user input).
|
||||
func GenUpdate(targetLocation string, hideSecrets bool) {
|
||||
// fetch old entry data
|
||||
unencryptedEntry := core.GetOldEntryData(targetLocation, 0)
|
||||
unencryptedEntry := core.GetOldEntryData(targetLocation, 0, GetRCWPassphrase())
|
||||
|
||||
// generate a new password
|
||||
unencryptedEntry[0] = inputPasswordGen()
|
||||
|
||||
Reference in New Issue
Block a user