Conversation
- Add `-remove` flag to delete keys from the keychain. Removal is implemented via atomic file rename to prevent corruption. - Add `-hash` flag to `2fa -add` to select SHA-1, SHA-256, or SHA-512. The algorithm is stored in the keychain for generation. - Update keychain parsing to handle optional hash algorithm field. - Add comprehensive tests for HOTP/TOTP with different hashes, keychain reading, and key removal. - Update module path to github.com/dgrieser/2fa. - Update vendor dependencies (clipboard) for Wayland and Termux support.
Update github.com/atotto/clipboard to v0.1.4. This version includes support for Plan 9, fixes Windows clipboard deadlocks by locking OS threads, and adds PowerShell support on Windows. Replace deprecated ioutil functions in main.go with os package equivalents. Update module path to rsc.io/2fa.
- Handle errors from file chmod operations to prevent silent failures - Ignore cleanup errors during removal to avoid masking primary failure logs - Gracefully handle clipboard write errors instead of panicking - Suppress binary write error return in HOTP generation as it is unlikely to fail
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Love you tool, so I thought I contribute.
-hashflag to2fa -addto select SHA-1, SHA-256, or SHA-512.The algorithm is stored in the keychain for generation.
-removeflag to delete keys from the keychain.Removal is implemented via atomic file rename to prevent corruption.
reading, and key removal.