pub struct PhpEncrypter { /* private fields */ }Expand description
The {iv, value, mac} envelope PHP MVC frameworks write, in Rust.
Implementations§
Source§impl PhpEncrypter
impl PhpEncrypter
Trait Implementations§
Source§impl Debug for PhpEncrypter
impl Debug for PhpEncrypter
Source§impl Encrypter for PhpEncrypter
impl Encrypter for PhpEncrypter
Source§fn encrypt_bytes(&self, plain: &[u8]) -> Result<String>
fn encrypt_bytes(&self, plain: &[u8]) -> Result<String>
Encrypt
plain, returning a self-describing, URL-safe payload.Source§fn decrypt_bytes(&self, payload: &str) -> Result<Vec<u8>>
fn decrypt_bytes(&self, payload: &str) -> Result<Vec<u8>>
Decrypt a payload produced by
encrypt_bytes. Read moreAuto Trait Implementations§
impl Freeze for PhpEncrypter
impl RefUnwindSafe for PhpEncrypter
impl Send for PhpEncrypter
impl Sync for PhpEncrypter
impl Unpin for PhpEncrypter
impl UnsafeUnpin for PhpEncrypter
impl UnwindSafe for PhpEncrypter
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<E> EncrypterExt for E
impl<E> EncrypterExt for E
Source§fn encrypt_json<T: Serialize>(&self, value: &T) -> Result<String>
fn encrypt_json<T: Serialize>(&self, value: &T) -> Result<String>
Encrypt any serialisable value as JSON.
Source§fn decrypt_json<T: DeserializeOwned>(&self, payload: &str) -> Result<T>
fn decrypt_json<T: DeserializeOwned>(&self, payload: &str) -> Result<T>
Decrypt JSON back into a value.