cell: Add accessors to Introduce2.
This commit is contained in:
parent
2a3fe5bf20
commit
4a5f94daa0
|
@ -1,2 +1,3 @@
|
|||
ADDED: establish_intro functions now take any impl<Into<HsMacKey>>.
|
||||
ADDED: Iterator over IntroEstablishedExt.
|
||||
ADDED: accessors for Introduce2
|
||||
|
|
|
@ -111,6 +111,23 @@ impl Introduce2 {
|
|||
msg,
|
||||
}
|
||||
}
|
||||
|
||||
/// Return the bytes used to transmit `header`.
|
||||
///
|
||||
/// (This data is used as part of the handshake.)
|
||||
pub fn encoded_header(&self) -> &[u8] {
|
||||
&self.encoded_header[..]
|
||||
}
|
||||
/// Return the parsed header of this message.
|
||||
pub fn header(&self) -> &IntroduceHeader {
|
||||
&self.msg.header
|
||||
}
|
||||
/// Return the encrypted body of this message.
|
||||
///
|
||||
/// (This body is decrypted as part of the handshake.)
|
||||
pub fn encrypted_body(&self) -> &[u8] {
|
||||
&self.msg.encrypted[..]
|
||||
}
|
||||
}
|
||||
|
||||
caret_int! {
|
||||
|
|
Loading…
Reference in New Issue