pub struct ProverOutput {
pub session_key: SharedSecret,
pub confirm_p: Vec<u8>,
}Expand description
Output returned by the Prover after verifying confirmV.
Fields§
§session_key: SharedSecretThe shared session key.
confirm_p: Vec<u8>The Prover’s confirmation MAC to send to the Verifier.
Implementations§
Source§impl ProverOutput
impl ProverOutput
Sourcepub fn into_session_key(self) -> SharedSecret
pub fn into_session_key(self) -> SharedSecret
Consume the output and yield the session key.
Because ProverOutput derives ZeroizeOnDrop, it cannot be
pattern-destructured by the caller. This consumer extracts the
session key cleanly without the boilerplate mem::replace shim
users would otherwise have to write themselves.
Both fields remain pub, so to keep confirm_p while consuming
session_key, clone it first:
ⓘ
let confirm_p = output.confirm_p.clone();
let session_key = output.into_session_key();Sourcepub fn into_confirm_p(self) -> Vec<u8> ⓘ
pub fn into_confirm_p(self) -> Vec<u8> ⓘ
Consume the output and yield the confirmP MAC.
Mirror of Self::into_session_key. To also keep session_key,
clone it first:
ⓘ
let session_key = output.session_key.clone();
let confirm_p = output.into_confirm_p();Trait Implementations§
Source§impl Drop for ProverOutput
impl Drop for ProverOutput
Auto Trait Implementations§
impl Freeze for ProverOutput
impl RefUnwindSafe for ProverOutput
impl Send for ProverOutput
impl Sync for ProverOutput
impl Unpin for ProverOutput
impl UnsafeUnpin for ProverOutput
impl UnwindSafe for ProverOutput
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