Struct nucypher_core::ReencryptionResponse
source · pub struct ReencryptionResponse { /* private fields */ }Expand description
A response from Ursula with reencrypted capsule frags.
Implementations§
source§impl ReencryptionResponse
impl ReencryptionResponse
sourcepub fn new<'a>(
signer: &Signer,
capsules_and_vcfrags: impl IntoIterator<Item = (&'a Capsule, VerifiedCapsuleFrag)>
) -> Self
pub fn new<'a>( signer: &Signer, capsules_and_vcfrags: impl IntoIterator<Item = (&'a Capsule, VerifiedCapsuleFrag)> ) -> Self
Creates and signs a new reencryption response.
sourcepub fn verify(
self,
capsules: &[Capsule],
alice_verifying_key: &PublicKey,
ursula_verifying_key: &PublicKey,
policy_encrypting_key: &PublicKey,
bob_encrypting_key: &PublicKey
) -> Result<Box<[VerifiedCapsuleFrag]>, VerificationError>
pub fn verify( self, capsules: &[Capsule], alice_verifying_key: &PublicKey, ursula_verifying_key: &PublicKey, policy_encrypting_key: &PublicKey, bob_encrypting_key: &PublicKey ) -> Result<Box<[VerifiedCapsuleFrag]>, VerificationError>
Verifies the reencryption response and returns the contained kfrags on success.
Trait Implementations§
source§impl Clone for ReencryptionResponse
impl Clone for ReencryptionResponse
source§fn clone(&self) -> ReencryptionResponse
fn clone(&self) -> ReencryptionResponse
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ReencryptionResponse
impl Debug for ReencryptionResponse
source§impl<'de> Deserialize<'de> for ReencryptionResponse
impl<'de> Deserialize<'de> for ReencryptionResponse
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<ReencryptionResponse> for ReencryptionResponse
impl PartialEq<ReencryptionResponse> for ReencryptionResponse
source§fn eq(&self, other: &ReencryptionResponse) -> bool
fn eq(&self, other: &ReencryptionResponse) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'a> ProtocolObject<'a> for ReencryptionResponse
impl<'a> ProtocolObject<'a> for ReencryptionResponse
source§impl Serialize for ReencryptionResponse
impl Serialize for ReencryptionResponse
impl StructuralPartialEq for ReencryptionResponse
Auto Trait Implementations§
impl RefUnwindSafe for ReencryptionResponse
impl Send for ReencryptionResponse
impl Sync for ReencryptionResponse
impl Unpin for ReencryptionResponse
impl UnwindSafe for ReencryptionResponse
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