pub struct Decoder<Type> {
pub name: &'static str,
pub description: &'static str,
pub link: &'static str,
pub tags: Vec<&'static str>,
pub popularity: f32,
pub phantom: PhantomData<Type>,
}
Expand description
The Interface defines what the struct for each decoder looks like
Fields§
§name: &'static str
The English name of the decoder.
description: &'static str
A description, you can take the first line from Wikipedia Sometimes our decoders do not exist on Wikipedia so we write our own.
link: &'static str
Wikipedia Link
The tags it has. See other decoders. Think of it as a “category” This is used to filter decoders. For example, if you want to filter decoders that are “base64” you would use the tag “base64” or “base”. You can also add tags like “online” to filter decoders that are online.
popularity: f32
We get popularity by eye-balling it or using the API’s data
phantom: PhantomData<Type>
we don’t use the Type, so we use PhantomData to mark it!
Trait Implementations§
Source§impl Crack for Decoder<A1Z26Decoder>
impl Crack for Decoder<A1Z26Decoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
Decode using the A1Z26 encoding
It returns an Option
A1Z26 is an encoding that maps each letter to its numeric position in the alphabet. This encoding cannot represent spaces or punctuation. The output of a successful decoding will be a string of capital letters with no spaces or punctuation.
This implementation accepts a list of decimal numbers separated by any combination of
delimiters including ,
;
:
‘-’ and whitespace. For successful decoding, the input
must contain at least one numeric digit, and every number must be in the range 1 to 26. The
input is allowed to start and end with delimiters.
If the input includes any characters other than numeric digits and recognized delimiters, then decoding will fail.
Note that the string -1
decodes to A
because the -
is interpreted as a delimiter, not a negative sign.
Gets all tags for this decoder
Source§impl Crack for Decoder<AtbashDecoder>
impl Crack for Decoder<AtbashDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<AtbashDecoder>
fn new() -> Decoder<AtbashDecoder>
Source§impl Crack for Decoder<Base32Decoder>
impl Crack for Decoder<Base32Decoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<Base32Decoder>
fn new() -> Decoder<Base32Decoder>
Source§impl Crack for Decoder<Base58BitcoinDecoder>
impl Crack for Decoder<Base58BitcoinDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<Base58BitcoinDecoder>
fn new() -> Decoder<Base58BitcoinDecoder>
Source§impl Crack for Decoder<Base58FlickrDecoder>
impl Crack for Decoder<Base58FlickrDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<Base58FlickrDecoder>
fn new() -> Decoder<Base58FlickrDecoder>
Source§impl Crack for Decoder<Base58MoneroDecoder>
impl Crack for Decoder<Base58MoneroDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<Base58MoneroDecoder>
fn new() -> Decoder<Base58MoneroDecoder>
Source§impl Crack for Decoder<Base58RippleDecoder>
impl Crack for Decoder<Base58RippleDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<Base58RippleDecoder>
fn new() -> Decoder<Base58RippleDecoder>
Source§impl Crack for Decoder<Base64Decoder>
impl Crack for Decoder<Base64Decoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<Base64Decoder>
fn new() -> Decoder<Base64Decoder>
Source§impl Crack for Decoder<Base65536Decoder>
impl Crack for Decoder<Base65536Decoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<Base65536Decoder>
fn new() -> Decoder<Base65536Decoder>
Source§impl Crack for Decoder<Base91Decoder>
impl Crack for Decoder<Base91Decoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<Base91Decoder>
fn new() -> Decoder<Base91Decoder>
Source§impl Crack for Decoder<BinaryDecoder>
impl Crack for Decoder<BinaryDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<BinaryDecoder>
fn new() -> Decoder<BinaryDecoder>
Source§impl Crack for Decoder<BrailleDecoder>
impl Crack for Decoder<BrailleDecoder>
Source§fn new() -> Decoder<BrailleDecoder>
fn new() -> Decoder<BrailleDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
Source§impl Crack for Decoder<BrainfuckInterpreter>
impl Crack for Decoder<BrainfuckInterpreter>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<BrainfuckInterpreter>
fn new() -> Decoder<BrainfuckInterpreter>
Source§impl Crack for Decoder<CaesarDecoder>
impl Crack for Decoder<CaesarDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<CaesarDecoder>
fn new() -> Decoder<CaesarDecoder>
Source§impl Crack for Decoder<CitrixCTX1Decoder>
impl Crack for Decoder<CitrixCTX1Decoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<CitrixCTX1Decoder>
fn new() -> Decoder<CitrixCTX1Decoder>
Source§impl Crack for Decoder<HexadecimalDecoder>
impl Crack for Decoder<HexadecimalDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<HexadecimalDecoder>
fn new() -> Decoder<HexadecimalDecoder>
Source§impl Crack for Decoder<MorseCodeDecoder>
impl Crack for Decoder<MorseCodeDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<MorseCodeDecoder>
fn new() -> Decoder<MorseCodeDecoder>
Source§impl Crack for Decoder<ROT47Decoder>
impl Crack for Decoder<ROT47Decoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<ROT47Decoder>
fn new() -> Decoder<ROT47Decoder>
Source§impl Crack for Decoder<RailfenceDecoder>
impl Crack for Decoder<RailfenceDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<RailfenceDecoder>
fn new() -> Decoder<RailfenceDecoder>
Source§impl Crack for Decoder<ReverseDecoder>
impl Crack for Decoder<ReverseDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<ReverseDecoder>
fn new() -> Decoder<ReverseDecoder>
Source§impl Crack for Decoder<SubstitutionGenericDecoder>
impl Crack for Decoder<SubstitutionGenericDecoder>
Source§fn new() -> Decoder<SubstitutionGenericDecoder>
fn new() -> Decoder<SubstitutionGenericDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
Source§impl Crack for Decoder<URLDecoder>
impl Crack for Decoder<URLDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<URLDecoder>
fn new() -> Decoder<URLDecoder>
Source§impl Crack for Decoder<VigenereDecoder>
impl Crack for Decoder<VigenereDecoder>
Source§fn new() -> Decoder<VigenereDecoder>
fn new() -> Decoder<VigenereDecoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
Source§impl Crack for Decoder<Z85Decoder>
impl Crack for Decoder<Z85Decoder>
Source§fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult
This function does the actual decoding
It returns an Option
Gets all tags for this decoder
Source§fn new() -> Decoder<Z85Decoder>
fn new() -> Decoder<Z85Decoder>
Auto Trait Implementations§
impl<Type> Freeze for Decoder<Type>
impl<Type> RefUnwindSafe for Decoder<Type>where
Type: RefUnwindSafe,
impl<Type> Send for Decoder<Type>where
Type: Send,
impl<Type> Sync for Decoder<Type>where
Type: Sync,
impl<Type> Unpin for Decoder<Type>where
Type: Unpin,
impl<Type> UnwindSafe for Decoder<Type>where
Type: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more