pub struct Ecies<K, E, A> { /* private fields */ }Expand description
Generic ECIES instance
Implementations
sourceimpl<K: Key, E, A> Ecies<K, E, A>
impl<K: Key, E, A> Ecies<K, E, A>
sourcepub fn new<T: IntoPublicKey<K>>(recipient_public_key: T) -> Self
pub fn new<T: IntoPublicKey<K>>(recipient_public_key: T) -> Self
Create a new ECIES<K, E, A> instance given a recipient_public_key compatible with K
pub fn try_new<T: TryIntoPublicKey<K>>(
recipient_public_key: T
) -> Result<Self, KeyError>
sourceimpl<K, E, A> Ecies<K, E, A>where
K: EciesMacEncryptionSupport + Key + GenerateEphemeralKey + KeyExchange + DeriveKeyMaterial,
E: EciesMacEncryptionSupport + Encryption + GenerateNonce + TakeEncryptionKey,
A: Mac + TakeMacKey,
impl<K, E, A> Ecies<K, E, A>where
K: EciesMacEncryptionSupport + Key + GenerateEphemeralKey + KeyExchange + DeriveKeyMaterial,
E: EciesMacEncryptionSupport + Encryption + GenerateNonce + TakeEncryptionKey,
A: Mac + TakeMacKey,
sourceimpl<K, E, A> Ecies<K, E, A>where
K: EciesMacDecryptionSupport + Key + TakeEphemeralKey + KeyExchange + DeriveKeyMaterial,
E: EciesMacDecryptionSupport + Encryption + TakeNonce + TakeEncryptionKey,
A: Mac + TakeMac,
impl<K, E, A> Ecies<K, E, A>where
K: EciesMacDecryptionSupport + Key + TakeEphemeralKey + KeyExchange + DeriveKeyMaterial,
E: EciesMacDecryptionSupport + Encryption + TakeNonce + TakeEncryptionKey,
A: Mac + TakeMac,
sourcepub fn decrypt<T: IntoSecretKey<K>>(
recipient_secret_key: T,
ciphertext: &[u8]
) -> Result<Vec<u8>, EciesError>
pub fn decrypt<T: IntoSecretKey<K>>(
recipient_secret_key: T,
ciphertext: &[u8]
) -> Result<Vec<u8>, EciesError>
Decrypt ciphertext using the ECIES-MAC variant, given the recipient_secret_key it was
encrypted for
sourceimpl<K, E> Ecies<K, E, Aead>where
K: EciesAeadEncryptionSupport + Key + GenerateEphemeralKey + KeyExchange + DeriveKeyMaterial,
E: EciesAeadEncryptionSupport + Encryption + GenerateNonce + TakeEncryptionKey,
impl<K, E> Ecies<K, E, Aead>where
K: EciesAeadEncryptionSupport + Key + GenerateEphemeralKey + KeyExchange + DeriveKeyMaterial,
E: EciesAeadEncryptionSupport + Encryption + GenerateNonce + TakeEncryptionKey,
sourceimpl<K, E> Ecies<K, E, Aead>where
K: EciesAeadDecryptionSupport + Key + TakeEphemeralKey + KeyExchange + DeriveKeyMaterial,
E: EciesAeadDecryptionSupport + Encryption + TakeNonce + TakeEncryptionKey,
impl<K, E> Ecies<K, E, Aead>where
K: EciesAeadDecryptionSupport + Key + TakeEphemeralKey + KeyExchange + DeriveKeyMaterial,
E: EciesAeadDecryptionSupport + Encryption + TakeNonce + TakeEncryptionKey,
sourcepub fn decrypt<T: IntoSecretKey<K>>(
recipient_secret_key: T,
ciphertext: &[u8]
) -> Result<Vec<u8>, EciesError>
pub fn decrypt<T: IntoSecretKey<K>>(
recipient_secret_key: T,
ciphertext: &[u8]
) -> Result<Vec<u8>, EciesError>
Decrypt ciphertext using the ECIES-AEAD variant, given the recipient_secret_key it was
encrypted for
sourceimpl<K, E> Ecies<K, E, Syn>where
K: EciesSynEncryptionSupport + Key + GenerateEphemeralKey + KeyExchange + DeriveKeyMaterial,
E: EciesSynEncryptionSupport + Encryption + TakeNonce + TakeEncryptionKey,
impl<K, E> Ecies<K, E, Syn>where
K: EciesSynEncryptionSupport + Key + GenerateEphemeralKey + KeyExchange + DeriveKeyMaterial,
E: EciesSynEncryptionSupport + Encryption + TakeNonce + TakeEncryptionKey,
sourceimpl<K, E> Ecies<K, E, Syn>where
K: EciesSynDecryptionSupport + Key + TakeEphemeralKey + KeyExchange + DeriveKeyMaterial,
E: EciesSynDecryptionSupport + Encryption + TakeNonce + TakeEncryptionKey,
impl<K, E> Ecies<K, E, Syn>where
K: EciesSynDecryptionSupport + Key + TakeEphemeralKey + KeyExchange + DeriveKeyMaterial,
E: EciesSynDecryptionSupport + Encryption + TakeNonce + TakeEncryptionKey,
sourcepub fn decrypt<T: IntoSecretKey<K>>(
recipient_secret_key: T,
ciphertext: &[u8]
) -> Result<Vec<u8>, EciesError>
pub fn decrypt<T: IntoSecretKey<K>>(
recipient_secret_key: T,
ciphertext: &[u8]
) -> Result<Vec<u8>, EciesError>
Decrypt ciphertext using the ECIES-SYN variant, given the recipient_secret_key it was
encrypted for
Auto Trait Implementations
impl<K, E, A> RefUnwindSafe for Ecies<K, E, A>where
A: RefUnwindSafe,
E: RefUnwindSafe,
K: RefUnwindSafe,
impl<K, E, A> Send for Ecies<K, E, A>where
A: Send,
E: Send,
K: Send,
impl<K, E, A> Sync for Ecies<K, E, A>where
A: Sync,
E: Sync,
K: Sync,
impl<K, E, A> Unpin for Ecies<K, E, A>where
A: Unpin,
E: Unpin,
K: Unpin,
impl<K, E, A> UnwindSafe for Ecies<K, E, A>where
A: UnwindSafe,
E: UnwindSafe,
K: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more