[−][src]Struct short_crypt::ShortCrypt
Implementations
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]
&self,
data: &T
) -> String
pub fn encrypt_to_url_component_and_push_to_string<T: ?Sized + AsRef<[u8]>, S: Into<String>>(
&self,
data: &T,
output: S
) -> String
[src]
&self,
data: &T,
output: S
) -> String
pub fn decrypt_url_component<S: AsRef<str>>(
&self,
url_component: S
) -> Result<Vec<u8>, &'static str>
[src]
&self,
url_component: S
) -> Result<Vec<u8>, &'static str>
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]
&self,
url_component: S,
output: Vec<u8>
) -> Result<Vec<u8>, &'static str>
pub fn encrypt_to_qr_code_alphanumeric<T: ?Sized + AsRef<[u8]>>(
&self,
data: &T
) -> String
[src]
&self,
data: &T
) -> String
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]
&self,
data: &T,
output: S
) -> String
pub fn decrypt_qr_code_alphanumeric<S: AsRef<str>>(
&self,
qr_code_alphanumeric: S
) -> Result<Vec<u8>, &'static str>
[src]
&self,
qr_code_alphanumeric: S
) -> Result<Vec<u8>, &'static str>
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]
&self,
qr_code_alphanumeric: S,
output: Vec<u8>
) -> Result<Vec<u8>, &'static str>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ShortCrypt
impl Send for ShortCrypt
impl Sync for ShortCrypt
impl Unpin for ShortCrypt
impl UnwindSafe for ShortCrypt
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,