/** Classes of value that are keyed per case unless disclosed (sorted). */ export declare const IDENTIFIER_CLASSES: readonly ['approver', 'content', 'principal', 'record', 'subject']; export type IdentifierClass = (typeof IDENTIFIER_CLASSES)[number]; export type PseudonymClass = Exclude; /** Metadata member only the auth service writes; `/v1/audit/log` refuses it. */ export declare const PLATFORM_MARKER = "grantex:platform"; type Json = Record; /** `sha256:` followed by the lower-case hex SHA-256 of `data`. */ export declare function digestBytes(data: Uint8Array | string): string; /** Digest of the RFC 8785 canonical form of a JSON value. */ export declare function digest(value: unknown): string; /** `chain.genesis`: digest of `{case, format, privacy, version}`. */ export declare function headerHash(pkg: Json): string; /** Digest of an entry with its `hash` member removed. */ export declare function entryHash(entry: Json): string; /** `chain.root`: digest of `{alg, canonicalization, genesis, head, length}`. */ export declare function chainRoot(chain: Json): string; /** The decision-grant `action_hash`: `"sha256:" + base64url(SHA-256(JCS(action)))`. */ export declare function decisionActionHash(action: Json): string; /** Hash of an auth-service audit entry, exactly as the audit chain stores it. */ export declare function auditEntryHash(entry: Json): string; /** `HMAC-SHA256(tenantKey, JCS(["grantex-evidence-case-v1", tenantId, caseId]))`. */ export declare function caseKey(tenantKey: Uint8Array, tenantId: string, caseId: string): Buffer; /** `"pz:" + base64url(HMAC(caseKey, JCS(["pseudonym-v1", class, value])))`. */ export declare function pseudonym(key: Uint8Array, identifierClass: PseudonymClass, value: string): string; /** Stable per-case pseudonym for an identifier (derives the case key first). */ export declare function pseudonymise(tenantKey: Uint8Array, tenantId: string, caseId: string, identifierClass: PseudonymClass, value: string): string; /** `"hmac-sha256:" + hex(HMAC(caseKey, JCS(["content-v1", digest])))`: tool input/output digests. */ export declare function keyedContentDigest(key: Uint8Array, valueDigest: string): string; /** `"ak:" + base64url(HMAC(caseKey, JCS(["action-v1", action_hash])))`: replaces `action_hash` while the subject is pseudonymised. */ export declare function actionReference(key: Uint8Array, actionHash: string): string; /** Whether `value` has the pseudonym form `pz:` + 43 base64url characters. */ export declare function isPseudonym(value: unknown): boolean; /** Whether `value` has the form `ak:` + 43 base64url characters. */ export declare function isActionReference(value: unknown): boolean; export {}; //# sourceMappingURL=hashing.d.ts.map