thali/NextGeneration/notification/thaliNotificationBeacons.js
function createPublicKeyHash (ecdhPublicKey) {
  return crypto.createHash(module.exports.SHA256)
    .update(ecdhPublicKey)
    .digest()
    .slice(0, 16);
}
function createPublicKeyHash (ecdhPublicKey) {
  return crypto.createHash(module.exports.SHA256)
    .update(ecdhPublicKey)
    .digest()
    .slice(0, 16);
}
function createPublicKeyHash ( ecdhPublicKey ) { return crypto . createHash ( module . exports . SHA256 ) . update ( ecdhPublicKey ) . digest ( ) . slice ( 0 , 16 ) ; }
Creates a 16 byte hash of a public key.

We choose 16 bytes as large enough to prevent accidentally collisions but
small enough not to eat up excess space in a beacon.

@param {Buffer} ecdhPublicKey The buffer representing the ECDH's public key.
@returns {Buffer}
Creates a 16 byte hash of a public key .