How to use the fast-srp-hap.Server function in fast-srp-hap

To help you get started, we’ve selected a few fast-srp-hap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github KhaosT / HAP-NodeJS / src / lib / HAPServer.ts View on Github external
srp.genKey(32, (error: Error, key: Buffer) => {
      // create a new SRP server
      var srpServer = new srp.Server(srpParams, bufferShim.from(salt), bufferShim.from("Pair-Setup"), bufferShim.from(this.accessoryInfo.pincode), key);
      var srpB = srpServer.computeB();
      // attach it to the current TCP session
      session.srpServer = srpServer;
      response.writeHead(200, {"Content-Type": "application/pairing+tlv8"});
      response.end(tlv.encode(TLVValues.SEQUENCE_NUM, States.M2, TLVValues.SALT, salt, TLVValues.PUBLIC_KEY, srpB));
      session._pairSetupState = States.M2;
    });
  }

fast-srp-hap

Secure Remote Password (SRP)

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis

Similar packages