diff --git a/README.md b/README.md index 561b449..275b164 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,15 @@ > FIDO(U2F, WebAuthn), YubiKey, OpenPGP command line tool Install: -``` +```shell cargo install --git https://git.hatter.ink/hatter/card-cli.git ``` +Compile without features: +```shell +cargo build --release --no-default-features +``` + # PGP ## encrypt & decrypt @@ -30,7 +35,7 @@ hW53WfImja+b5kwwyqUikyMCAwEAAQ== ``` encrypt -``` +```shell $ openssl rsautl -encrypt -pubin -inkey enc_key.pem -in test.txt -out enc.txt -pkcs OR @@ -39,7 +44,7 @@ $ openssl pkeyutl -encrypt -inkey enc_key.pem -pubin -in a.txt -out enc.txt ``` decrypt -``` +```shell $ card-cli pgp-card-decrypt -c $(cat enc.txt | xxd -ps -c 11111) OR @@ -50,7 +55,7 @@ $ card-cli piv-decrypt -s r3 -c "$(cat enc.txt | base64)" ## sign & verify sign -``` +```shell $ card-cli pgp-card-sign -2 $(shasum -a 256 test.txt | awk '{print $1}') OR @@ -59,7 +64,7 @@ $ card-cli pgp-card-sign --in test.txt --use-sha256 ``` verify -``` +```shell $ openssl dgst -sha256 -verify sign_key.pem -signature sig test.txt Verified OK ```