// ZCLAW ID 生成工具
import { randomBytes } from 'crypto';

export function generateId(prefix: string = ''): string {
  const timestamp = Date.now().toString(36);
  const random = randomBytes(4).toString('hex');
  return prefix ? `${prefix}_${timestamp}_${random}` : `${timestamp}_${random}`;
}

export function generateShortId(): string {
  return randomBytes(6).toString('base64url');
}
