[−][src]Enum safe_app::cipher_opt::CipherOpt
Cipher Options
Variants
No encryption
Encrypt using symmetric keys (usually for private data)
Encrypt using asymmetric encryption (encrypting for peer to read)
Fields of Asymmetric
peer_encrypt_key: PublicKey
PublicKey of the peer to whom we want to encrypt
Implementations
impl CipherOpt
[src]
pub fn encrypt(
&self,
plain_text: &[u8],
app_ctx: &AppContext
) -> Result<Vec<u8>, AppError>
[src]
&self,
plain_text: &[u8],
app_ctx: &AppContext
) -> Result<Vec<u8>, AppError>
Encrypt plain text
pub async fn decrypt<'_, '_, '_>(
cipher_text: &'_ [u8],
app_ctx: &'_ AppContext,
client: &'_ AppClient
) -> Result<Vec<u8>, AppError>
[src]
cipher_text: &'_ [u8],
app_ctx: &'_ AppContext,
client: &'_ AppClient
) -> Result<Vec<u8>, AppError>
Decrypt something encrypted by CipherOpt::encrypt()
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for CipherOpt
impl Send for CipherOpt
impl Sync for CipherOpt
impl Unpin for CipherOpt
impl UnwindSafe for CipherOpt
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> DebugAny for T where
T: Any + Debug,
T: Any + Debug,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,