From e436becaf734b151d22392d7f9eb422ac370cd2c Mon Sep 17 00:00:00 2001 From: Emil Ivanichkov Date: Fri, 26 Jan 2024 17:48:49 +0200 Subject: [PATCH] feat: Add `getCSOutbound` & `getCSInbound` methods to `HandshakeResult` --- src/handshake.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/handshake.ts b/src/handshake.ts index 6a9623c..0580081 100644 --- a/src/handshake.ts +++ b/src/handshake.ts @@ -47,6 +47,14 @@ export class HandshakeResult { constructor(private csOutbound: CipherState, private csInbound: CipherState) {} + getCSOutbound(): CipherState { + return this.csOutbound; + } + + getCSInbound(): CipherState { + return this.csInbound; + } + // Noise specification, Section 5: // Transport messages are then encrypted and decrypted by calling EncryptWithAd() // and DecryptWithAd() on the relevant CipherState with zero-length associated data.