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

Feature/issue 21 #60

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Feature/issue 21 #60

wants to merge 9 commits into from

Conversation

omibo
Copy link
Contributor

@omibo omibo commented Apr 4, 2024

This pull request implements a command-line interface (CLI) for the SHA-3 hash function.
To use this feature, users can follow these steps:

  1. Run cargo install --path .
    After installation, users can execute the following command:
  2. capycrypt sha3 "msg" -b security_bit

Replace "msg" with the message to be hashed and security_bit with the desired security level in bits."

Comment on lines +127 to +138
/// # Examples
///
/// ```
/// use capycrypt::SecParam;
/// use capycrypt::OperationError;
///
/// assert_eq!(SecParam::from_int(224).unwrap(), SecParam::D224);
/// assert_eq!(SecParam::from_int(256).unwrap(), SecParam::D256);
/// assert_eq!(SecParam::from_int(384).unwrap(), SecParam::D384);
/// assert_eq!(SecParam::from_int(512).unwrap(), SecParam::D512);
/// assert_eq!(SecParam::from_int(1024), Err(OperationError::UnsupportedSecurityParameter))
/// ```
Copy link
Owner

Choose a reason for hiding this comment

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

these doc tests can be really hard to maintain if we ever need to change the security parameters. I would recommend removing this section and simply stating the supported security params as simple comments instead

#[derive(Debug, StructOpt)]
#[structopt(
name = "capycrypt-cli",
about = "Support command-line interface for capyCrypt library"
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
about = "Support command-line interface for capyCrypt library"
about = "Command-line interface for capycrypt library"

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.

None yet

2 participants