PeerID 11/n: Noise types use PeerID + create separate files (#750)

* Noise types use PeerID

* Fix tests

* Extract `NoiseSessionManager` into a separate file

* Extract `NoiseSessionState` into a separate file

* Remove `failed` state from `NoiseSessionState`

* Extract `NoiseSessionError` into a separate file
This commit is contained in:
Islam
2025-10-05 15:51:06 +02:00
committed by GitHub
parent 64f91bb1d6
commit 03c357f048
13 changed files with 329 additions and 311 deletions
@@ -54,7 +54,7 @@ final class BinaryProtocolTests: XCTestCase {
// Verify recipient
XCTAssertNotNil(decodedPacket.recipientID)
let decodedRecipientID = decodedPacket.recipientID?.trimmingNullBytes()
XCTAssertEqual(String(data: decodedRecipientID!, encoding: .utf8), recipientID)
XCTAssertTrue(String(data: decodedRecipientID!, encoding: .utf8) == recipientID)
}
func testPacketWithSignature() throws {
@@ -251,7 +251,7 @@ final class BinaryProtocolTests: XCTestCase {
originalSender: TestConstants.testNickname3,
isPrivate: false,
recipientNickname: nil,
senderPeerID: TestConstants.testPeerID1,
senderPeerID: TestConstants.testPeerID1.id,
mentions: nil
)