This repository has been archived by the owner on Jul 5, 2024. It is now read-only.
Add support for saving and reloading encrypted backup file #26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for this great tool, I wanted to use this code to keep encrypted backup files of my tokens, so I made some modifications and then tried to make them clean so that it can be useful to others:
Added two command line arguments (with default values the behavior is unchanged):
-save
in order to save the encrypted backup file as json. In this case the decryption and console display of the tokens are disabled so that backup password is not required.-load
in order to load an encrypted backup file instead of fetching it from the serverI'll add some documentation if you are ok with merging this. I would advise to "hide whitespace" in the "diff view" for the review, as most of the changes are indented lines that are now in
if
blocks.It's my first time reading or writing Go, so don't hesitate to advise improvements!