Skip to content

Commit

Permalink
Merge pull request #63 from rustaceanrob/session-id-09-13
Browse files Browse the repository at this point in the history
  • Loading branch information
rustaceanrob committed Sep 15, 2024
2 parents 8b3492c + d3eaa82 commit 18f66a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions protocol/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@ impl PacketWriter {
/// Encrypt and decrypt messages with a peer.
#[derive(Clone, Debug)]
pub struct PacketHandler {
/// A unique identifier for the communication session.
pub session_id: [u8; 32],
packet_reader: PacketReader,
packet_writer: PacketWriter,
}
Expand All @@ -354,6 +356,7 @@ impl PacketHandler {
let packet_decoding_cipher =
FSChaCha20Poly1305::new(materials.responder_packet_key);
PacketHandler {
session_id: materials.session_id,
packet_reader: PacketReader {
length_decoding_cipher,
packet_decoding_cipher,
Expand All @@ -372,6 +375,7 @@ impl PacketHandler {
let packet_decoding_cipher =
FSChaCha20Poly1305::new(materials.initiator_packet_key);
PacketHandler {
session_id: materials.session_id,
packet_reader: PacketReader {
length_decoding_cipher,
packet_decoding_cipher,
Expand Down

0 comments on commit 18f66a9

Please sign in to comment.