this repo has no description
1import { createHash } from 'node:crypto';
2
3const hash = (parts) => createHash('sha256').update(parts.join('|')).digest('hex');
4
5export const attestationRkey = ({ subject, service }) =>
6 hash([subject, service.type, service.community ?? '', service.identifier ?? '']);
7
8export const membershipRkey = ({ attestedBy, service }) =>
9 hash([attestedBy, service.type, service.community ?? '', service.identifier ?? '']);