pub struct Ecies<K, E, A> { /* private fields */ }Expand description
Generic ECIES instance
Implementations§
Source§impl<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>
Source§impl<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,
Source§impl<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: IntoSecretKeyRef<K>>(
recipient_secret_key: &T,
ciphertext: &[u8],
) -> Result<Vec<u8>, EciesError>
pub fn decrypt<T: IntoSecretKeyRef<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
Source§impl<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,
Source§impl<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: IntoSecretKeyRef<K>>(
recipient_secret_key: &T,
ciphertext: &[u8],
) -> Result<Vec<u8>, EciesError>
pub fn decrypt<T: IntoSecretKeyRef<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
Source§impl<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,
Source§impl<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: IntoSecretKeyRef<K>>(
recipient_secret_key: &T,
ciphertext: &[u8],
) -> Result<Vec<u8>, EciesError>
pub fn decrypt<T: IntoSecretKeyRef<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> Freeze for Ecies<K, E, A>where
K: Freeze,
impl<K, E, A> RefUnwindSafe for Ecies<K, E, A>
impl<K, E, A> Send for Ecies<K, E, A>
impl<K, E, A> Sync for Ecies<K, E, A>
impl<K, E, A> Unpin for Ecies<K, E, A>
impl<K, E, A> UnwindSafe for Ecies<K, E, A>
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