thali/NextGeneration/notification/thaliNotificationBeacons.js
function generatePskSecret(ecdhForLocalDevice, remotePeerPublicKey,
                                  pskIdentityField) {
  var sxy = ecdhForLocalDevice.computeSecret(remotePeerPublicKey);
  return HKDF(module.exports.SHA256, sxy, pskIdentityField)
    .derive('', module.exports.AES_256_KEY_SIZE);
}
function generatePskSecret(ecdhForLocalDevice, remotePeerPublicKey,
                                  pskIdentityField) {
  var sxy = ecdhForLocalDevice.computeSecret(remotePeerPublicKey);
  return HKDF(module.exports.SHA256, sxy, pskIdentityField)
    .derive('', module.exports.AES_256_KEY_SIZE);
}
function generatePskSecret ( ecdhForLocalDevice , remotePeerPublicKey , pskIdentityField ) { var sxy = ecdhForLocalDevice . computeSecret ( remotePeerPublicKey ) ; return HKDF ( module . exports . SHA256 , sxy , pskIdentityField ) . derive ( '' , module . exports . AES_256_KEY_SIZE ) ; }
Generates a PSK secret between the local device and a remote peer.
@param {ECDH} ecdhForLocalDevice
@param {Buffer} remotePeerPublicKey
@param {string} pskIdentityField
@returns {Buffer}
Generates a PSK secret between the local device and a remote peer .