Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README to fix bad paths and input/output #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dcousens
Copy link

@dcousens dcousens commented Jul 21, 2024

This pull request updates the README to fix some bad paths (the example didn't work) and aligns the input with the output.

Additionally, rather than hinting that AGE_TPM_PIN is how you might use a pin, I update the copy to say that this is how you might use the plugin non-interactively, instead.

--pin will prompt when encrypting and decrypting, no environment variable required.

@@ -40,21 +40,26 @@ $ age-plugin-tpm --generate -o age-identity.txt
$ age-plugin-tpm -y age-identity.txt > age-recipient.txt

# Encrypt / Decrypt something
$ echo "Hack The Planet" | age -R ./age-recipient.txt -o test-decrypt.txt
$ age --decrypt -i ./age-identity.txt -o - test-decrypt.txt
$ echo 'Hack The Planet!' | age -R age-recipient.txt -o test-decrypt.txt
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing !, and single-quotes preferred for non-expanded strings

Copy link
Author

@dcousens dcousens Jul 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dropped ./, as you don't use that for the other paths

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing !

Lol, yes.

$ AGE_TPM_PIN=123 age-plugin-tpm --generate --pin -o age-identity.txt
$ age-plugin-tpm -y age-identity > age-recipient.txt
$ AGE_TPM_PIN=1234 age-plugin-tpm --generate --pin -o age-identity.txt
$ age-plugin-tpm -y age-identity.txt > age-recipient.txt
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing .txt suffix

Hack The Planet!
```

### With PIN
You can add `--pin` when calling `--generate` to require a PIN when encrypting or decrypting.
Copy link
Author

@dcousens dcousens Jul 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, we could make the default example use --pin - which I think is preferred - and maybe an addendum in place of this text that says that --pin is optional?

@dcousens
Copy link
Author

dcousens commented Jul 21, 2024

If desired, I can split this up into two different pull requests, fixes and new copy

@Foxboron
Copy link
Owner

Looks good to me, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants