feat: Add `getCSOutbound` & `getCSInbound` methods to `HandshakeResult`

This commit is contained in:
Emil Ivanichkov 2024-01-26 17:48:49 +02:00 committed by richΛrd
parent 4d6d4ca5bd
commit e436becaf7
1 changed files with 8 additions and 0 deletions

View File

@ -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.