feat: add non-blocking Noise handshake, SecureConnection transport

refactor
This commit is contained in:
2026-02-19 11:34:43 -03:00
parent 4c1927588d
commit 75087fb635
4 changed files with 962 additions and 92 deletions

View File

@@ -84,7 +84,8 @@ test "noise: SecureConnection init without handshake is not encrypted" {
// Just test initialization (can't test full handshake without network)
var socket: core.socket.Socket = undefined;
const keypair = KeyPair.generate();
const secure = SecureConnection.init(&socket, keypair, allocator);
var secure: SecureConnection = undefined;
secure.init(&socket, keypair, allocator);
try testing.expect(!secure.isEncrypted());
try testing.expect(secure.getRemotePublicKey() == null);