diff --git a/.github/workflows/CD.yaml b/.github/workflows/CD.yaml index b01cc3a3..5f04c123 100644 --- a/.github/workflows/CD.yaml +++ b/.github/workflows/CD.yaml @@ -76,7 +76,7 @@ jobs: targets: ${{ matrix.target }} - name: Install cross if: ${{ matrix.use-cross }} - uses: taiki-e/install-action@v2.42.12 + uses: taiki-e/install-action@v2.42.14 with: tool: cross - name: Cache build artifacts diff --git a/Cargo.lock b/Cargo.lock index 722a2cfe..23c25058 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,7 +28,7 @@ dependencies = [ [[package]] name = "abcrypt-cli" -version = "0.3.2" +version = "0.3.3" dependencies = [ "abcrypt", "anyhow", @@ -309,9 +309,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.1" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "cbindgen" @@ -380,9 +380,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.11" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35723e6a11662c2afb578bcf0b88bf6ea8e21282a953428f240574fcc3a2b5b3" +checksum = "0fbb260a053428790f3de475e304ff84cdbc4face759ea7a3e64c1edd938a7fc" dependencies = [ "clap_builder", "clap_derive", @@ -390,9 +390,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.11" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49eb96cbfa7cfa35017b7cd548c75b14c3118c98b423041d70562665e07fb0fa" +checksum = "64b17d7ea74e9f833c7dbf2cbe4fb12ff26783eda4782a8975b72f895c9b4d99" dependencies = [ "anstream", "anstyle", @@ -403,9 +403,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.11" +version = "4.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6ae69fbb0833c6fcd5a8d4b8609f108c7ad95fc11e248d853ff2c42a90df26a" +checksum = "a8670053e87c316345e384ca1f3eba3006fc6355ed8b8a1140d104e109e3df34" dependencies = [ "clap", ] @@ -422,9 +422,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.11" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d029b67f89d30bbb547c89fd5161293c0aec155fc691d7924b64550662db93e" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -627,9 +627,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -767,12 +767,11 @@ checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" [[package]] name = "ppv-lite86" -version = "0.2.19" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2288c0e17cc8d342c712bb43a257a80ebffce59cdb33d5000d8348f3ec02528b" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" dependencies = [ "zerocopy", - "zerocopy-derive", ] [[package]] @@ -976,9 +975,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -1110,9 +1109,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.121" +version = "1.0.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ab380d7d9f22ef3f21ad3e6c1ebe8e4fc7a2000ccba2e4d71fc96f15b2cb609" +checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" dependencies = [ "itoa", "memchr", @@ -1207,12 +1206,13 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "b8fcd239983515c23a32fb82099f97d0b11b8c72f654ed659363a95c3dad7a53" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", "windows-sys 0.52.0", ] @@ -1289,7 +1289,7 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.3.0", "toml_datetime", "winnow", ] diff --git a/Cargo.toml b/Cargo.toml index 2e6c2923..e2ed72fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ repository = "https://github.com/sorairolake/abcrypt" [workspace.dependencies] anyhow = "1.0.86" -clap = { version = "4.5.11", features = ["derive"] } +clap = { version = "4.5.13", features = ["derive"] } dialoguer = { version = "0.11.0", default-features = false, features = ["password"] } [profile.release.package.abcrypt-cli] diff --git a/crates/abcrypt/Cargo.toml b/crates/abcrypt/Cargo.toml index c2c47b45..430c7ac5 100644 --- a/crates/abcrypt/Cargo.toml +++ b/crates/abcrypt/Cargo.toml @@ -49,7 +49,7 @@ serde = { version = "1.0.204", default-features = false, features = ["derive"], anyhow.workspace = true clap.workspace = true dialoguer.workspace = true -serde_json = "1.0.121" +serde_json = "1.0.122" serde_test = "1.0.176" [features] diff --git a/crates/abcrypt/examples/decrypt.rs b/crates/abcrypt/examples/decrypt.rs index 4c2fcc52..52c292f1 100644 --- a/crates/abcrypt/examples/decrypt.rs +++ b/crates/abcrypt/examples/decrypt.rs @@ -31,7 +31,7 @@ struct Opt { /// Input file. /// - /// If [FILE] is not specified, data will be read from stdin. + /// If [FILE] is not specified, data will be read from standard input. #[arg(value_name("FILE"))] input: Option, } @@ -45,7 +45,7 @@ fn main() -> anyhow::Result<()> { let mut buf = Vec::new(); io::stdin() .read_to_end(&mut buf) - .context("could not read data from stdin")?; + .context("could not read data from standard input")?; Ok(buf) }?; @@ -67,6 +67,6 @@ fn main() -> anyhow::Result<()> { } else { io::stdout() .write_all(&plaintext) - .context("could not write data to stdout") + .context("could not write data to standard output") } } diff --git a/crates/abcrypt/examples/encrypt.rs b/crates/abcrypt/examples/encrypt.rs index 973f6a80..570f36a7 100644 --- a/crates/abcrypt/examples/encrypt.rs +++ b/crates/abcrypt/examples/encrypt.rs @@ -43,7 +43,7 @@ struct Opt { /// Input file. /// - /// If [FILE] is not specified, data will be read from stdin. + /// If [FILE] is not specified, data will be read from standard input. #[arg(value_name("FILE"))] input: Option, } @@ -57,7 +57,7 @@ fn main() -> anyhow::Result<()> { let mut buf = Vec::new(); io::stdin() .read_to_end(&mut buf) - .context("could not read data from stdin")?; + .context("could not read data from standard input")?; Ok(buf) }?; @@ -75,6 +75,6 @@ fn main() -> anyhow::Result<()> { } else { io::stdout() .write_all(&ciphertext) - .context("could not write data to stdout") + .context("could not write data to standard output") } } diff --git a/crates/abcrypt/examples/info.rs b/crates/abcrypt/examples/info.rs index 3299dcb4..c5d1d146 100644 --- a/crates/abcrypt/examples/info.rs +++ b/crates/abcrypt/examples/info.rs @@ -30,7 +30,7 @@ struct Opt { /// Input file. /// - /// If [FILE] is not specified, data will be read from stdin. + /// If [FILE] is not specified, data will be read from standard input. #[arg(value_name("FILE"))] input: Option, } @@ -44,7 +44,7 @@ fn main() -> anyhow::Result<()> { let mut buf = Vec::new(); io::stdin() .read_to_end(&mut buf) - .context("could not read data from stdin")?; + .context("could not read data from standard input")?; Ok(buf) }?; diff --git a/crates/cli/CHANGELOG.adoc b/crates/cli/CHANGELOG.adoc index 10be7f6c..de7642da 100644 --- a/crates/cli/CHANGELOG.adoc +++ b/crates/cli/CHANGELOG.adoc @@ -14,6 +14,13 @@ All notable changes to this project will be documented in this file. The format is based on https://keepachangelog.com/[Keep a Changelog], and this project adheres to https://semver.org/[Semantic Versioning]. +== {compare-url}/abcrypt-cli-v0.3.2\...abcrypt-cli-v0.3.3[0.3.3] - 2024-08-04 + +=== Changed + +* Change `--passphrase-from-env` to take an UTF-8 string as an environment + variable key ({pull-request-url}/531[#531]) + == {compare-url}/abcrypt-cli-v0.3.1\...abcrypt-cli-v0.3.2[0.3.2] - 2024-04-17 === Changed diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index bf9bdd48..308b2909 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "abcrypt-cli" -version = "0.3.2" +version = "0.3.3" authors.workspace = true edition.workspace = true rust-version.workspace = true @@ -28,10 +28,10 @@ abcrypt = { version = "0.3.6", path = "../abcrypt", features = ["serde"] } anyhow.workspace = true byte-unit = "5.1.4" clap = { workspace = true, features = ["wrap_help"] } -clap_complete = "4.5.11" +clap_complete = "4.5.12" clap_complete_nushell = "4.5.3" dialoguer.workspace = true -serde_json = { version = "1.0.121", optional = true } +serde_json = { version = "1.0.122", optional = true } sysexits = "0.8.1" [dev-dependencies] diff --git a/crates/cli/README.md b/crates/cli/README.md index 54f9c69b..277e0db8 100644 --- a/crates/cli/README.md +++ b/crates/cli/README.md @@ -83,7 +83,7 @@ Output: ### Generate shell completion -`--generate-completion` option generates shell completions to stdout. +`--generate-completion` option generates shell completions to standard output. The following shells are supported: diff --git a/crates/cli/src/app.rs b/crates/cli/src/app.rs index 50571c1a..d971193a 100644 --- a/crates/cli/src/app.rs +++ b/crates/cli/src/app.rs @@ -13,10 +13,11 @@ use crate::{ input, output, params, passphrase, }; -/// Ensures that there are no conflicts if reading the passphrase from stdin. +/// Ensures that there are no conflicts if reading the passphrase from standard +/// input. fn ensure_stdin_does_not_conflict(path: Option<&Path>) -> anyhow::Result<()> { if path.is_none() { - bail!("cannot read both passphrase and input data from stdin"); + bail!("cannot read both passphrase and input data from standard input"); } Ok(()) } diff --git a/crates/cli/src/cli.rs b/crates/cli/src/cli.rs index 167b4876..89f996fd 100644 --- a/crates/cli/src/cli.rs +++ b/crates/cli/src/cli.rs @@ -3,7 +3,7 @@ // SPDX-License-Identifier: GPL-3.0-or-later use std::{ - ffi::{OsStr, OsString}, + ffi::OsStr, fmt, io::{self, Write}, ops::Deref, @@ -37,19 +37,19 @@ const LONG_VERSION: &str = concat!( const AFTER_LONG_HELP: &str = "See `abcrypt(1)` for more details."; const ENCRYPT_AFTER_LONG_HELP: &str = concat!( - "By default, the result will be write to stdout.\n", + "By default, the result will be write to standard output.\n", '\n', "See `abcrypt-encrypt(1)` for more details." ); const DECRYPT_AFTER_LONG_HELP: &str = concat!( - "By default, the result will be write to stdout.\n", + "By default, the result will be write to standard output.\n", '\n', "See `abcrypt-decrypt(1)` for more details." ); const INFORMATION_AFTER_LONG_HELP: &str = concat!( - "The result will be write to stdout.\n", + "The result will be write to standard output.\n", '\n', "See `abcrypt-information(1)` for more details." ); @@ -69,7 +69,7 @@ const INFORMATION_AFTER_LONG_HELP: &str = concat!( pub struct Opt { /// Generate shell completion. /// - /// The completion is output to stdout. + /// The completion is output to standard output. #[arg(long, value_enum, value_name("SHELL"))] pub generate_completion: Option, @@ -136,7 +136,7 @@ pub struct Encrypt { #[arg(long, group("passphrase"))] pub passphrase_from_tty: bool, - /// Read the passphrase from stdin. + /// Read the passphrase from standard input. #[arg(long, group("passphrase"))] pub passphrase_from_stdin: bool, @@ -149,7 +149,7 @@ pub struct Encrypt { /// Note that storing a passphrase in an environment variable can be a /// security risk. #[arg(long, value_name("VAR"), group("passphrase"))] - pub passphrase_from_env: Option, + pub passphrase_from_env: Option, /// Read the passphrase from the file. /// @@ -168,7 +168,7 @@ pub struct Encrypt { /// Input file. /// - /// If [FILE] is not specified, data will be read from stdin. + /// If [FILE] is not specified, data will be read from standard input. #[arg(value_name("FILE"), value_hint(ValueHint::FilePath))] pub input: Option, } @@ -187,7 +187,7 @@ pub struct Decrypt { #[arg(long, group("passphrase"))] pub passphrase_from_tty: bool, - /// Read the passphrase from stdin. + /// Read the passphrase from standard input. #[arg(long, group("passphrase"))] pub passphrase_from_stdin: bool, @@ -196,7 +196,7 @@ pub struct Decrypt { /// Note that storing a passphrase in an environment variable can be a /// security risk. #[arg(long, value_name("VAR"), group("passphrase"))] - pub passphrase_from_env: Option, + pub passphrase_from_env: Option, /// Read the passphrase from the file. /// @@ -215,7 +215,7 @@ pub struct Decrypt { /// Input file. /// - /// If [FILE] is not specified, data will be read from stdin. + /// If [FILE] is not specified, data will be read from standard input. #[arg(value_name("FILE"), value_hint(ValueHint::FilePath))] pub input: Option, } @@ -229,7 +229,7 @@ pub struct Information { /// Input file. /// - /// If [FILE] is not specified, data will be read from stdin. + /// If [FILE] is not specified, data will be read from standard input. #[arg(value_name("FILE"), value_hint(ValueHint::FilePath))] pub input: Option, } diff --git a/crates/cli/src/input.rs b/crates/cli/src/input.rs index a6f5cb33..137cfef0 100644 --- a/crates/cli/src/input.rs +++ b/crates/cli/src/input.rs @@ -18,7 +18,7 @@ pub fn read(path: Option<&Path>) -> anyhow::Result> { let mut buf = Vec::new(); io::stdin() .read_to_end(&mut buf) - .context("could not read data from stdin")?; + .context("could not read data from standard input")?; Ok(buf) } } diff --git a/crates/cli/src/output.rs b/crates/cli/src/output.rs index cab915b7..fb2b0455 100644 --- a/crates/cli/src/output.rs +++ b/crates/cli/src/output.rs @@ -15,9 +15,9 @@ pub fn write_to_file(path: &Path, data: &[u8]) -> anyhow::Result<()> { fs::write(path, data).with_context(|| format!("could not write data to {}", path.display())) } -/// Writes the result to stdout. +/// Writes the result to standard output. pub fn write_to_stdout(data: &[u8]) -> anyhow::Result<()> { io::stdout() .write_all(data) - .context("could not write data to stdout") + .context("could not write data to standard output") } diff --git a/crates/cli/src/passphrase.rs b/crates/cli/src/passphrase.rs index ec265686..f9b09be3 100644 --- a/crates/cli/src/passphrase.rs +++ b/crates/cli/src/passphrase.rs @@ -4,7 +4,6 @@ use std::{ env, - ffi::OsStr, fs::File, io::{self, BufRead, BufReader}, path::Path, @@ -25,12 +24,12 @@ pub fn read_passphrase_from_tty() -> anyhow::Result { .context("could not read passphrase") } -/// Reads the passphrase from stdin. +/// Reads the passphrase from standard input. pub fn read_passphrase_from_stdin() -> anyhow::Result { let mut buf = String::new(); io::stdin() .read_line(&mut buf) - .context("could not read passphrase from stdin")?; + .context("could not read passphrase from standard input")?; buf.remove_newline(); Ok(buf) } @@ -45,7 +44,7 @@ pub fn read_passphrase_from_tty_once() -> anyhow::Result { } /// Reads the passphrase from the environment variable. -pub fn read_passphrase_from_env(key: &OsStr) -> anyhow::Result { +pub fn read_passphrase_from_env(key: &str) -> anyhow::Result { env::var(key).context("could not read passphrase from environment variable") } diff --git a/crates/cli/tests/assets/decrypt-after-long-help.md b/crates/cli/tests/assets/decrypt-after-long-help.md index 2bbc34af..e7467e75 100644 --- a/crates/cli/tests/assets/decrypt-after-long-help.md +++ b/crates/cli/tests/assets/decrypt-after-long-help.md @@ -1,3 +1,3 @@ -By default, the result will be write to stdout. +By default, the result will be write to standard output. See `abcrypt-decrypt(1)` for more details. diff --git a/crates/cli/tests/assets/encrypt-after-long-help.md b/crates/cli/tests/assets/encrypt-after-long-help.md index efbd14d3..cdb83a45 100644 --- a/crates/cli/tests/assets/encrypt-after-long-help.md +++ b/crates/cli/tests/assets/encrypt-after-long-help.md @@ -1,3 +1,3 @@ -By default, the result will be write to stdout. +By default, the result will be write to standard output. See `abcrypt-encrypt(1)` for more details. diff --git a/crates/cli/tests/assets/information-after-long-help.md b/crates/cli/tests/assets/information-after-long-help.md index a3f2f0a1..d2f2a7ea 100644 --- a/crates/cli/tests/assets/information-after-long-help.md +++ b/crates/cli/tests/assets/information-after-long-help.md @@ -1,3 +1,3 @@ -The result will be write to stdout. +The result will be write to standard output. See `abcrypt-information(1)` for more details. diff --git a/crates/cli/tests/decrypt.rs b/crates/cli/tests/decrypt.rs index 0db53ffb..2b0a6d46 100644 --- a/crates/cli/tests/decrypt.rs +++ b/crates/cli/tests/decrypt.rs @@ -94,7 +94,7 @@ fn validate_conflicts_if_reading_from_stdin_for_decrypt_command() { .assert() .failure() .stderr(predicate::str::ends_with( - "cannot read both passphrase and input data from stdin\n", + "cannot read both passphrase and input data from standard input\n", )); } diff --git a/crates/cli/tests/encrypt.rs b/crates/cli/tests/encrypt.rs index d8967231..2470e434 100644 --- a/crates/cli/tests/encrypt.rs +++ b/crates/cli/tests/encrypt.rs @@ -399,7 +399,7 @@ fn validate_conflicts_if_reading_from_stdin_for_encrypt_command() { .assert() .failure() .stderr(predicate::str::ends_with( - "cannot read both passphrase and input data from stdin\n", + "cannot read both passphrase and input data from standard input\n", )); } diff --git a/docs/book/modules/cli/pages/usage.adoc b/docs/book/modules/cli/pages/usage.adoc index 67cbb5f0..573af480 100644 --- a/docs/book/modules/cli/pages/usage.adoc +++ b/docs/book/modules/cli/pages/usage.adoc @@ -49,7 +49,7 @@ abcrypt information -j data.txt.abcrypt | jq == Generate shell completion -`--generate-completion` option generates shell completions to stdout. +`--generate-completion` option generates shell completions to standard output. .The following shells are supported * `bash` diff --git a/docs/man/man1/abcrypt-decrypt.1.adoc b/docs/man/man1/abcrypt-decrypt.1.adoc index 6ae4f8e2..02aa972a 100644 --- a/docs/man/man1/abcrypt-decrypt.1.adoc +++ b/docs/man/man1/abcrypt-decrypt.1.adoc @@ -4,7 +4,7 @@ = abcrypt-decrypt(1) // Specify in UTC. -:docdate: 2024-04-15 +:docdate: 2024-08-02 :doctype: manpage ifdef::revnumber[:mansource: abcrypt {revnumber}] ifndef::revnumber[:mansource: abcrypt] @@ -21,7 +21,12 @@ abcrypt-decrypt - decrypt files == DESCRIPTION -This command decrypt files. By default, the result will be write to stdout. +This command decrypts _FILE_. By default, the result will be write to standard +output. If _FILE_ is not specified, data will be read from standard input. If +*-o* is specified, the result will be write to the specified file. + +The passphrase used for decryption can be read from either `/dev/tty`, standard +input, an environment variable, or a file. *abcrypt dec* and *abcrypt d* are aliases for this command. @@ -29,7 +34,7 @@ This command decrypt files. By default, the result will be write to stdout. _FILE_:: - Input file. If _FILE_ is not specified, data will be read from stdin. + Input file. If _FILE_ is not specified, data will be read from standard input. == OPTIONS @@ -39,12 +44,12 @@ _FILE_:: *--passphrase-from-tty*:: - Read the passphrase from /dev/tty. This is the default behavior. + Read the passphrase from `/dev/tty`. This is the default behavior. *--passphrase-from-stdin*:: - Read the passphrase from stdin. This option cannot be used if _FILE_ is also - stdin. + Read the passphrase from standard input. This option cannot be used if _FILE_ + is also standard input. *--passphrase-from-env* _VAR_:: diff --git a/docs/man/man1/abcrypt-encrypt.1.adoc b/docs/man/man1/abcrypt-encrypt.1.adoc index c2d78a3f..2a572ee5 100644 --- a/docs/man/man1/abcrypt-encrypt.1.adoc +++ b/docs/man/man1/abcrypt-encrypt.1.adoc @@ -4,7 +4,7 @@ = abcrypt-encrypt(1) // Specify in UTC. -:docdate: 2024-04-15 +:docdate: 2024-08-02 :doctype: manpage ifdef::revnumber[:mansource: abcrypt {revnumber}] ifndef::revnumber[:mansource: abcrypt] @@ -21,7 +21,12 @@ abcrypt-encrypt - encrypt files == DESCRIPTION -This command encrypt files. By default, the result will be write to stdout. +This command encrypts _FILE_. By default, the result will be write to standard +output. If _FILE_ is not specified, data will be read from standard input. If +*-o* is specified, the result will be write to the specified file. + +The passphrase used for encryption can be read from either `/dev/tty`, standard +input, an environment variable, or a file. *abcrypt enc* and *abcrypt e* are aliases for this command. @@ -29,7 +34,7 @@ This command encrypt files. By default, the result will be write to stdout. _FILE_:: - Input file. If _FILE_ is not specified, data will be read from stdin. + Input file. If _FILE_ is not specified, data will be read from standard input. == OPTIONS @@ -58,16 +63,16 @@ _FILE_:: *--passphrase-from-tty*:: - Read the passphrase from /dev/tty. This is the default behavior. + Read the passphrase from `/dev/tty`. This is the default behavior. *--passphrase-from-stdin*:: - Read the passphrase from stdin. This option cannot be used if _FILE_ is also - stdin. + Read the passphrase from standard input. This option cannot be used if _FILE_ + is also standard input. *--passphrase-from-tty-once*:: - Read the passphrase from /dev/tty only once. + Read the passphrase from `/dev/tty` only once. *--passphrase-from-env* _VAR_:: diff --git a/docs/man/man1/abcrypt-information.1.adoc b/docs/man/man1/abcrypt-information.1.adoc index c3c86598..90b27c33 100644 --- a/docs/man/man1/abcrypt-information.1.adoc +++ b/docs/man/man1/abcrypt-information.1.adoc @@ -4,12 +4,15 @@ = abcrypt-information(1) // Specify in UTC. -:docdate: 2024-04-15 +:docdate: 2024-08-02 :doctype: manpage ifdef::revnumber[:mansource: abcrypt {revnumber}] ifndef::revnumber[:mansource: abcrypt] :manmanual: General Commands Manual ifndef::site-gen-antora[:includedir: ./include] +:ietf-datatracker: https://datatracker.ietf.org +:datatracker-html-doc: {ietf-datatracker}/doc/html +:rfc9106: {datatracker-html-doc}/rfc9106 == NAME @@ -21,8 +24,28 @@ abcrypt-information - provides information about the encryption parameters == DESCRIPTION -This command provides information about the encryption parameters. The result -will be write to stdout. +This command provides information about the encryption parameters from _FILE_. +The result will be write to standard output. If _FILE_ is not specified, data +will be read from standard input. + +The encryption parameters outputs either a human-readable string or JSON. + +.List of the encryption parameters +|=== +|Parameter |Description + +|`m` (`memoryCost`) +|The memory size in KiB + +|`t` (`timeCost`) +|The number of iterations + +|`p` (`parallelism`) +|The degree of parallelism +|=== + +The encryption parameters represents the same thing as the Argon2 parameters as +defined in {rfc9106}[RFC 9106]. *abcrypt info* and *abcrypt i* are aliases for this command. @@ -30,7 +53,7 @@ will be write to stdout. _FILE_:: - Input file. If _FILE_ is not specified, data will be read from stdin. + Input file. If _FILE_ is not specified, data will be read from standard input. == OPTIONS diff --git a/docs/man/man1/abcrypt.1.adoc b/docs/man/man1/abcrypt.1.adoc index f61c4125..e9e6c896 100644 --- a/docs/man/man1/abcrypt.1.adoc +++ b/docs/man/man1/abcrypt.1.adoc @@ -4,7 +4,7 @@ = abcrypt(1) // Specify in UTC. -:docdate: 2024-07-02 +:docdate: 2024-08-02 :doctype: manpage ifdef::revnumber[:mansource: abcrypt {revnumber}] ifndef::revnumber[:mansource: abcrypt] @@ -22,7 +22,7 @@ abcrypt - an utility for encrypt and decrypt files == DESCRIPTION *{manname}* is a command-line utility for encrypt and decrypt files using the -abcrypt encrypted data format. +*abcrypt*(5) encrypted data format. == COMMANDS @@ -56,7 +56,7 @@ abcrypt encrypted data format. *--generate-completion* _SHELL_:: - Generate shell completion. The completion is output to stdout. + Generate shell completion. The completion is output to standard output. The possible values are:{blank}:::