Détail du package

@bonniernews/persistent-hash

BonnierNews558ISC1.4.0

Bonnier news library for hashing user_ids.

sha-256, crypto, hash

readme

persistent-hash

Bonnier news library for hashing user_ids.

Usage

const { createPersistentHashedId } = require('@bonniernews/persistent-hash');

or


import { createPersistentHashedId } from '@bonniernews/persistent-hash';

Example

async function hashUserID(id) {
  try {
    const hashedId = await createPersistentHashedId(id);
    return hashedId;
  } catch (error) {
    console.error('Error hashing the user ID:', error);
    throw error;
  }
}