Class ApiKeyHasher

java.lang.Object
dev.dokimos.server.filter.ApiKeyHasher

public final class ApiKeyHasher extends Object
Hashes raw API keys to the SHA-256 hex form stored in the database.
  • Method Details

    • sha256Hex

      public static String sha256Hex(String rawKey)
      Returns the lowercase SHA-256 hex digest of the given key. The raw key is never persisted; this digest is what gets stored and compared at authentication time.
      Parameters:
      rawKey - the raw API key
      Returns:
      64-character lowercase hex digest