Enum reepal::Operation

source ·
pub enum Operation {
    Caesar {
        string: Option<String>,
        bytes: Option<String>,
        offset: i32,
        hex: bool,
        file: bool,
    },
    Xor {
        string: Option<String>,
        bytes: Option<String>,
        hex: bool,
        key: String,
    },
}

Variants

Caesar

Fields

string: Option<String>

Example: $cpal caesar -s abc 1 => bcd

bytes: Option<String>

Example: $cpal caesar -b 97,98,99 1 => bcd

offset: i32
hex: bool

Set the hex flag if the bytes are hex encoded

file: bool

use input as file

Uses caesar decoding on input with the given offset

Xor

Fields

string: Option<String>

Example: $cpal xor -s abc -k xxx

bytes: Option<String>

Example: $cpal xor -b 97, 98, 99 -k xxx

hex: bool

Set the hex flag if the bytes are hex encoded

key: String

Uses Xor encoding on input with key the input can either be a string or a list of bytes

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Assign values from ArgMatches to self.
Assign values from ArgMatches to self.
Append to Command so it can instantiate Self. Read more
Append to Command so it can update self. Read more
Test whether Self can parse a specific subcommand

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.