import { createHash } from "crypto";

/**
 * SHA-256 hash a token string to a hex digest.
 * Used consistently for refresh token hashing and blacklist keys.
 */
export function hashToken(token: string): string {
  return createHash("sha256").update(token).digest("hex");
}
