mirror of
https://github.com/logos-messaging/noise.git
synced 2026-01-02 14:13:07 +00:00
Add method to get channel binding
Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
This commit is contained in:
parent
ad132441f7
commit
b16acbb322
7
state.go
7
state.go
@ -396,3 +396,10 @@ func (s *HandshakeState) ReadMessage(out, message []byte) ([]byte, *CipherState,
|
||||
|
||||
return out, nil, nil, nil
|
||||
}
|
||||
|
||||
// ChannelBinding provides a value that uniquely identifies the session and can
|
||||
// be used as a channel binding. It is an error to call this method before the
|
||||
// handshake is complete.
|
||||
func (s *HandshakeState) ChannelBinding() []byte {
|
||||
return s.ss.h
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user