use clap::{Parser, Subcommand};
#[derive(Parser, Debug)]
#[command(author, version, about)]
pub struct Args {
#[command[subcommand]]
pub algorithm: Algorithm,
}
#[derive(Subcommand, Debug)]
pub enum Algorithm {
#[command(
about = "Generates an MD5 hash of the file",
long_about = "Computes the MD5 hash of the given file, providing a 128-bit hash value."
)]
Md5 {
#[arg(short, long)]
path: std::path::PathBuf,
},
#[command(
about = "Generates a SHA-1 hash of the file",
long_about = "Computes the SHA-1 hash of the given file, providing a 160-bit hash value."
)]
Sha1 {
#[arg(short, long)]
path: std::path::PathBuf,
},
#[command(
about = "Generates a SHA-256 hash of the file",
long_about = "Computes the SHA-256 hash of the given file, providing a 256-bit hash value."
)]
Sha256 {
#[arg(short, long)]
path: std::path::PathBuf,
},
#[command(
about = "Generates a SHA-512 hash of the file",
long_about = "Computes the SHA-512 hash of the given file, providing a 512-bit hash value."
)]
Sha512 {
#[arg(short, long)]
path: std::path::PathBuf,
},
}