[][src]Struct short_crypt::ShortCrypt

pub struct ShortCrypt { /* fields omitted */ }

Methods

impl ShortCrypt[src]

pub fn new<S: AsRef<str>>(key: S) -> ShortCrypt[src]

Create a new ShortCrypt instance.

pub fn encrypt<T: ?Sized + AsRef<[u8]>>(&self, plaintext: &T) -> Cipher[src]

pub fn decrypt(&self, data: &Cipher) -> Result<Vec<u8>, &'static str>[src]

pub fn encrypt_to_url_component<T: ?Sized + AsRef<[u8]>>(
    &self,
    data: &T
) -> String
[src]

pub fn encrypt_to_url_component_and_push_to_string<T: ?Sized + AsRef<[u8]>, S: Into<String>>(
    &self,
    data: &T,
    output: S
) -> String
[src]

pub fn decrypt_url_component<S: AsRef<str>>(
    &self,
    url_component: S
) -> Result<Vec<u8>, &'static str>
[src]

pub fn decrypt_url_component_and_push_to_vec<S: AsRef<str>>(
    &self,
    url_component: S,
    output: Vec<u8>
) -> Result<Vec<u8>, &'static str>
[src]

pub fn encrypt_to_qr_code_alphanumeric<T: ?Sized + AsRef<[u8]>>(
    &self,
    data: &T
) -> String
[src]

pub fn encrypt_to_qr_code_alphanumeric_and_push_to_string<T: ?Sized + AsRef<[u8]>, S: Into<String>>(
    &self,
    data: &T,
    output: S
) -> String
[src]

pub fn decrypt_qr_code_alphanumeric<S: AsRef<str>>(
    &self,
    qr_code_alphanumeric: S
) -> Result<Vec<u8>, &'static str>
[src]

pub fn decrypt_qr_code_alphanumeric_and_push_to_vec<S: AsRef<str>>(
    &self,
    qr_code_alphanumeric: S,
    output: Vec<u8>
) -> Result<Vec<u8>, &'static str>
[src]

Trait Implementations

impl Debug for ShortCrypt[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]