import crypto from 'node:crypto'

export function randomToken(bytes = 24): string {
  return crypto.randomBytes(bytes).toString('hex')
}

export function randomId(prefix: string, bytes = 6): string {
  return `${prefix}${crypto.randomBytes(bytes).toString('hex')}`
}
