/** * Conformance Digest Computation * * Handles SHA-256 hashing, JCS canonicalization, and vectors digest computation. */ /** * Compute SHA-256 digest of a string */ export declare function sha256(content: string): string; /** * Convert Zod path array to JSON Pointer (RFC 6901) * * @param path - Array of path segments from Zod (string for keys, number for array indices) * @returns JSON Pointer string (e.g., "/evidence/attestations/0/scope") */ export declare function zodPathToJsonPointer(path: (string | number)[]): string; /** * Compute canonical input digest using JCS (RFC 8785) * * Uses JSON Canonicalization Scheme for deterministic serialization, * ensuring consistent digests across implementations regardless of * JSON key ordering from JSON.parse. * * @returns Object with alg and value (alg differs if fallback was used) */ export declare function computeCanonicalDigest(input: unknown): { alg: string; value: string; }; /** * Compute comprehensive vectors digest by hashing all fixture files * * VECTORS DIGEST CONTRACT (NORMATIVE): * ==================================== * * 1. FILE SELECTION: * - INCLUDES: manifest.json (if present) at root level * - INCLUDES: All files in category directories with extensions: .json, .txt, .jwks, .pem, .zip * - EXCLUDES: .DS_Store, .gitkeep, Thumbs.db * * 2. RECURSION: * - Hashes files in nested directories (e.g., bundle/vectors/*.json) * * 3. ORDERING: * - All files sorted lexicographically by normalized relative path * - Path separator is always forward slash (/) * - Comparison uses default string comparison (ASCII/Unicode code point order) * * 4. HASH INPUT FORMAT (per file): * - relativePath + NUL byte (\x00) + sha256(fileBytes) * - relativePath uses forward slashes, no leading slash * - fileBytes are raw bytes, NO newline normalization * * 5. FINAL DIGEST: * - SHA-256 of all concatenated (path + NUL + hash) entries * - Reported as lowercase hex string * * This contract ensures: * - Digest changes when any fixture content changes * - Digest is reproducible across platforms * - Digest can be verified by other implementations */ export declare function computeVectorsDigest(fixturesDir: string, categories: string[]): string; //# sourceMappingURL=digest.d.ts.map