libp2p/protocols/secure/noise

    Dark Mode
Search:
Group by:
  Source   Edit

Types

Noise = ref object of Secure
  rng: ref HmacDrbgContext
  localPrivateKey: PrivateKey
  localPublicKey: seq[byte]
  noiseKeys: KeyPair
  commonPrologue: seq[byte]
  outgoing: bool
  Source   Edit
NoiseConnection = ref object of SecureConn
  readCs: CipherState
  writeCs: CipherState
  Source   Edit
NoiseError = object of LPError
  Source   Edit

Consts

NoiseCodec = "/noise"
  Source   Edit

Procs

proc new(T: typedesc[Noise]; rng: ref HmacDrbgContext; privateKey: PrivateKey;
         outgoing: bool = true; commonPrologue: seq[byte] = @[]): T:type {.
    ...raises: [].}
  Source   Edit
func shortLog(conn: NoiseConnection): auto {....raises: [], tags: [].}
  Source   Edit

Methods

method closeImpl(s: NoiseConnection): Future[void] {.stackTrace: false, ...gcsafe,
    raises: [], raises: [], raises: [], tags: [RootEffect].}
  Source   Edit
method handshake(p: Noise; conn: Connection; initiator: bool;
                 peerId: Opt[PeerId]): Future[SecureConn] {.stackTrace: false,
    ...gcsafe, raises: [], raises: [], raises: [], tags: [RootEffect].}
  Source   Edit
method init(p: Noise) {....gcsafe, raises: [], tags: [].}
  Source   Edit
method readMessage(sconn: NoiseConnection): Future[seq[byte]] {.
    stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [],
    tags: [RootEffect].}
  Source   Edit
method write(sconn: NoiseConnection; message: seq[byte]): Future[void] {.
    ...raises: [], tags: [WriteIOEffect, TimeEffect, RootEffect].}
  Source   Edit

Templates

template formatItIMPL(it: NoiseConnection): auto
  Source   Edit