Struct Decoder

Source
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

§tags: Vec<&'static str>

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>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

Decode using the A1Z26 encoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

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.

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Self

This function generates a new crack trait
Source§

impl Crack for Decoder<AtbashDecoder>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<AtbashDecoder>

This function generates a new crack trait
Source§

impl Crack for Decoder<Base32Decoder>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<Base32Decoder>

This function generates a new crack trait
Source§

impl Crack for Decoder<Base58BitcoinDecoder>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<Base58BitcoinDecoder>

This function generates a new crack trait
Source§

impl Crack for Decoder<Base58FlickrDecoder>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<Base58FlickrDecoder>

This function generates a new crack trait
Source§

impl Crack for Decoder<Base58MoneroDecoder>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<Base58MoneroDecoder>

This function generates a new crack trait
Source§

impl Crack for Decoder<Base58RippleDecoder>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<Base58RippleDecoder>

This function generates a new crack trait
Source§

impl Crack for Decoder<Base64Decoder>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<Base64Decoder>

This function generates a new crack trait
Source§

impl Crack for Decoder<Base65536Decoder>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<Base65536Decoder>

This function generates a new crack trait
Source§

impl Crack for Decoder<Base91Decoder>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<Base91Decoder>

This function generates a new crack trait
Source§

impl Crack for Decoder<BinaryDecoder>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<BinaryDecoder>

This function generates a new crack trait
Source§

impl Crack for Decoder<BrailleDecoder>

Source§

fn new() -> Decoder<BrailleDecoder>

This function generates a new crack trait
Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

Crack is the function that actually does the decoding
Source§

fn get_tags(&self) -> &Vec<&str>

Get all tags for the current decoder
Source§

fn get_name(&self) -> &str

Get the nam of the current decoder
Source§

impl Crack for Decoder<BrainfuckInterpreter>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<BrainfuckInterpreter>

This function generates a new crack trait
Source§

impl Crack for Decoder<CaesarDecoder>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<CaesarDecoder>

This function generates a new crack trait
Source§

impl Crack for Decoder<CitrixCTX1Decoder>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<CitrixCTX1Decoder>

This function generates a new crack trait
Source§

impl Crack for Decoder<HexadecimalDecoder>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<HexadecimalDecoder>

This function generates a new crack trait
Source§

impl Crack for Decoder<MorseCodeDecoder>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<MorseCodeDecoder>

This function generates a new crack trait
Source§

impl Crack for Decoder<ROT47Decoder>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<ROT47Decoder>

This function generates a new crack trait
Source§

impl Crack for Decoder<RailfenceDecoder>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<RailfenceDecoder>

This function generates a new crack trait
Source§

impl Crack for Decoder<ReverseDecoder>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<ReverseDecoder>

This function generates a new crack trait
Source§

impl Crack for Decoder<SubstitutionGenericDecoder>

Source§

fn new() -> Decoder<SubstitutionGenericDecoder>

This function generates a new crack trait
Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

Crack is the function that actually does the decoding
Source§

fn get_tags(&self) -> &Vec<&str>

Get all tags for the current decoder
Source§

fn get_name(&self) -> &str

Get the nam of the current decoder
Source§

impl Crack for Decoder<URLDecoder>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<URLDecoder>

This function generates a new crack trait
Source§

impl Crack for Decoder<VigenereDecoder>

Source§

fn new() -> Decoder<VigenereDecoder>

This function generates a new crack trait
Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

Crack is the function that actually does the decoding
Source§

fn get_tags(&self) -> &Vec<&str>

Get all tags for the current decoder
Source§

fn get_name(&self) -> &str

Get the nam of the current decoder
Source§

impl Crack for Decoder<Z85Decoder>

Source§

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

This function does the actual decoding It returns an Option if it was successful Else the Option returns nothing and the error is logged in Trace

Source§

fn get_tags(&self) -> &Vec<&str>

Gets all tags for this decoder

Source§

fn get_name(&self) -> &str

Gets the name for the current decoder

Source§

fn new() -> Decoder<Z85Decoder>

This function generates a new crack trait
Source§

impl Default for Decoder<DefaultDecoder>

Source§

fn default() -> Decoder<DefaultDecoder>

Returns the “default value” for a type. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,