Port to latest libmutton development version & begin migration from GPG to RCW

This commit is contained in:
2025-05-04 18:07:02 -04:00
parent b366d1e13e
commit a144b2769d
9 changed files with 56 additions and 44 deletions
+4 -4
View File
@@ -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()