mirror of https://github.com/waku-org/go-noise.git
feat: add functions to retrieve h,e,rs,re
This commit is contained in:
parent
aedffc51a8
commit
daf3130edf
20
handshake.go
20
handshake.go
|
@ -284,6 +284,22 @@ func (h *Handshake) FinalizeHandshake() (*HandshakeResult, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandshakeComplete indicates whether the handshake process is complete or not
|
// HandshakeComplete indicates whether the handshake process is complete or not
|
||||||
func (hs *Handshake) IsComplete() bool {
|
func (h *Handshake) IsComplete() bool {
|
||||||
return hs.hsResult != nil
|
return h.hsResult != nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (h *Handshake) LocalEphemeralKeypair() Keypair {
|
||||||
|
return h.hs.e
|
||||||
|
}
|
||||||
|
|
||||||
|
func (h *Handshake) RemoteStaticPublicKey() []byte {
|
||||||
|
return h.hs.rs
|
||||||
|
}
|
||||||
|
|
||||||
|
func (h *Handshake) RemoteEphemeralPublicKey() []byte {
|
||||||
|
return h.hs.re
|
||||||
|
}
|
||||||
|
|
||||||
|
func (h *Handshake) H() []byte {
|
||||||
|
return h.hs.ss.h
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue