Class Protector

Hierarchy

  • Protector

Index

References

Constructors

Properties

Methods

References

MultiaddrConnection

Re-exports MultiaddrConnection

errors

Renames and exports Errors

generate

Re-exports generate

Constructors

constructor

  • new Protector(keyBuffer: Uint8Array): Protector
  • Takes a Private Shared Key (psk) and provides a protect method for wrapping existing connections in a private encryption stream.

    Parameters

    • keyBuffer: Uint8Array

      The private shared key buffer

    Returns Protector

Properties

psk

psk: any

tag

tag: any

Methods

protect

  • Takes a given Connection and creates a private encryption stream between its two peers from the PSK the Protector instance was created with.

    Parameters

    Returns Promise<MultiaddrConnection>

    A protected duplex iterable