mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
10 lines
232 B
TypeScript
10 lines
232 B
TypeScript
|
import { createHash } from 'crypto';
|
||
|
|
||
|
export function anonymise(s: string): string {
|
||
|
const hash = createHash('sha256')
|
||
|
.update(s, 'utf-8')
|
||
|
.digest('hex')
|
||
|
.slice(0, 9);
|
||
|
return `${hash}@unleash.run`;
|
||
|
}
|