Skip to main content

Transcript

Struct Transcript 

Source
pub struct Transcript<K: Kex>(/* private fields */);
Expand description

SSH exchange transcript. Only the digest state is retained across the network round trip.

Implementations§

Source§

impl<K: Kex> Transcript<K>

Source

pub fn new( client_id: &[u8], server_id: &[u8], client_kexinit: &[u8], server_kexinit: &[u8], ) -> Result<Self>

Hash the identification strings (without CR/LF) and the original KEXINIT payloads (including the message number). Their packet buffers may then be reused.

§Errors

Returns an error if a field exceeds the SSH string length limit.

Source

pub fn finish( self, server_host_key: &[u8], init: &K::Init, reply: &K::Reply, secret: &K::Secret, ) -> Result<Output<K::Hash>>

Hash the original host-key or certificate blob (without its outer string length), the two method-specific public fields, and the shared secret. Returns the hash H that the server signs.

§Errors

Returns an error if an SSH field cannot be encoded.

Trait Implementations§

Source§

impl<K: Kex> Debug for Transcript<K>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<K> Forget for Transcript<K>

§

impl<K> Freeze for Transcript<K>
where <K as Kex>::Hash: Freeze,

§

impl<K> Move for Transcript<K>

§

impl<K> RefUnwindSafe for Transcript<K>
where <K as Kex>::Hash: RefUnwindSafe,

§

impl<K> Send for Transcript<K>
where <K as Kex>::Hash: Send,

§

impl<K> Sync for Transcript<K>
where <K as Kex>::Hash: Sync,

§

impl<K> Unpin for Transcript<K>
where <K as Kex>::Hash: Unpin,

§

impl<K> UnsafeUnpin for Transcript<K>
where <K as Kex>::Hash: UnsafeUnpin,

§

impl<K> UnwindSafe for Transcript<K>
where <K as Kex>::Hash: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.