@lanonasis/cli
Version:
Professional CLI for LanOnasis Memory as a Service (MaaS) with MCP support, seamless inline editing, and enterprise-grade security
24 lines (23 loc) • 766 B
TypeScript
/**
* Local Hash Utilities for CLI
* Copied from shared/hash-utils.ts to avoid TypeScript rootDir issues
*/
/**
* Determine if the provided value is already a SHA-256 hex digest
*/
export declare function isSha256Hash(value: string): boolean;
/**
* Hash an API key with SHA-256
* Used for: Database storage, validation, lookups
*
* @param apiKey - The raw API key to hash
* @returns SHA-256 hash as hex string (64 characters)
*/
export declare function hashApiKey(apiKey: string): string;
/**
* Normalize any API key input to a SHA-256 hex digest
* Leaves an existing 64-char hex hash untouched to prevent double hashing
*/
export declare function ensureApiKeyHash(apiKey: string): string;
export type ApiKeyHash = string;
export type ApiKey = string;