import { createHash, randomBytes } from 'node:crypto';

export function generateDeviceToken(): string {
  return randomBytes(48).toString('base64url');
}

export function hashDeviceToken(token: string): string {
  return createHash('sha256').update(token).digest('hex');
}
