import { createHash, randomBytes } from 'crypto' export function createAccessToken(): string { return randomBytes(32).toString('hex') } export function hashToken(token: string): string { return createHash('sha256').update(token).digest('hex') } export function createShareCode(): string { return randomBytes(6).toString('hex') }