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>
impl<K: Kex> Transcript<K>
Sourcepub fn new(
client_id: &[u8],
server_id: &[u8],
client_kexinit: &[u8],
server_kexinit: &[u8],
) -> Result<Self>
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.
Sourcepub fn finish(
self,
server_host_key: &[u8],
init: &K::Init,
reply: &K::Reply,
secret: &K::Secret,
) -> Result<Output<K::Hash>>
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§
Auto Trait Implementations§
impl<K> Forget for Transcript<K>
impl<K> Freeze for Transcript<K>
impl<K> Move for Transcript<K>
impl<K> RefUnwindSafe for Transcript<K>
impl<K> Send for Transcript<K>
impl<K> Sync for Transcript<K>
impl<K> Unpin for Transcript<K>
impl<K> UnsafeUnpin for Transcript<K>
impl<K> UnwindSafe for Transcript<K>
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