Struct serde_encrypt::shared_key::SharedKey [−][src]
pub struct SharedKey(_);
Expand description
32-byte key shared among sender and receiver secretly.
It is a good practice to use SerdeEncryptPublicKey to exchange this shared key.
Trait Implementations
type R = RngSingletonImpl
type R = RngSingletonImplRNG singleton
Constructor from secret bytes.
fn to_chacha_key(
&self
) -> &GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>[src]
fn to_chacha_key(
&self
) -> &GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>[src]Makes chacha20poly1305::Key
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]Deserialize this value from the given Serde deserializer. Read more
type S = CborSerializer<Self>
type S = CborSerializer<Self>Serializer implementation
fn encrypt(
&self,
combined_key: &SenderCombinedKey<'_, '_>
) -> Result<EncryptedMessage, Error> where
Self: Serialize, [src]
fn encrypt(
&self,
combined_key: &SenderCombinedKey<'_, '_>
) -> Result<EncryptedMessage, Error> where
Self: Serialize, [src]Serialize and encrypt. Read more
fn decrypt_owned(
encrypted_message: &EncryptedMessage,
combined_key: &ReceiverCombinedKey<'_, '_>
) -> Result<Self, Error> where
Self: DeserializeOwned, [src]
fn decrypt_owned(
encrypted_message: &EncryptedMessage,
combined_key: &ReceiverCombinedKey<'_, '_>
) -> Result<Self, Error> where
Self: DeserializeOwned, [src]Decrypt and deserialize into DeserializeOwned type. Read more
fn decrypt_ref<'de>(
encrypted_message: &EncryptedMessage,
combined_key: &ReceiverCombinedKey<'_, '_>
) -> Result<Self::S, Error> where
Self: Deserialize<'de>, [src]
fn decrypt_ref<'de>(
encrypted_message: &EncryptedMessage,
combined_key: &ReceiverCombinedKey<'_, '_>
) -> Result<Self::S, Error> where
Self: Deserialize<'de>, [src]Just decrypts cipher-text. Returned data must be deserialized later.
Types implementing serde::Deserialize<'de> (not serde::de::DeserializeOwned) should use
this function to resolve lifetime. Read more
Auto Trait Implementations
impl RefUnwindSafe for SharedKeyimpl UnwindSafe for SharedKeyBlanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = TShould always be Self
pub fn vzip(self) -> V