lockbox

password manager
Log | Files | Refs | README | LICENSE

commit f6d427dc04c526bf59c34283c2128854a6a20a75
parent 661e92be08f6ebdc8bae760309bc2591b88911fe
Author: Sean Enck <sean@ttypty.com>
Date:   Sat, 16 Jul 2022 14:42:07 -0400

reuse in/out options

Diffstat:
Mcmd/lb-rekey/main.go | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/cmd/lb-rekey/main.go b/cmd/lb-rekey/main.go @@ -20,9 +20,12 @@ func main() { if err != nil { misc.Die("failed finding entries", err) } + inOpts := encrypt.LockboxOptions{Key: *inKey, KeyMode: *inMode} + outOpts := encrypt.LockboxOptions{Key: *outKey, KeyMode: *outMode} for _, file := range found { fmt.Printf("rekeying: %s\n", file) - in, err := encrypt.NewLockbox(encrypt.LockboxOptions{Key: *inKey, KeyMode: *inMode, File: file}) + inOpts.File = file + in, err := encrypt.NewLockbox(inOpts) if err != nil { misc.Die("unable to make input lockbox", err) } @@ -30,7 +33,8 @@ func main() { if err != nil { misc.Die("failed to process file decryption", err) } - out, err := encrypt.NewLockbox(encrypt.LockboxOptions{Key: *outKey, KeyMode: *outMode, File: file}) + outOpts.File = file + out, err := encrypt.NewLockbox(outOpts) if err != nil { misc.Die("unable to make output lockbox", err) }