Compute an unsalted system hash on demand¶
Produces the identity hash with no salting applied, so a validating service can compare it directly against the output of De-salt and validate credential lifetime.
| Field | Value |
|---|---|
| Operation ID | OP-SH-02 |
| Trigger | Direct call by a validating service (no in-repo caller). |
| Inputs | type (SystemType), systemName (string) |
| Outputs | 44-character Base64 SHA-256 string |
| Primary components | SystemHashService.ComputeHashNow |
| Entry point | src/SAIF.NetCore.SystemHash/SAIF.NetCore.SystemHash/SAIF.NetCore.SystemHash/SystemHashService.cs |
Steps¶
- Compute the deterministic identity hash for
typeandsystemName(BR-SH-01, BR-SH-02): - Build the identity string
"{systemName}-{(int)type}", using theSystemTypeenum's integer ordinal, not its name. - Encode the identity string as UTF-16LE bytes (
Encoding.Unicode.GetBytes). - Compute the SHA-256 digest of those bytes.
- Base64-encode the digest (44 characters) and return it.
See Compute the identity hash for the full step-by-step detail of this delegation.
Origin: Step 1 is implemented in Compute the identity hash and executed on behalf of this operation. 2. Return the identity hash with no salting applied (BR-SH-05).
Process flow¶
The following diagram shows the on-demand computation of the canonical, unsalted identity hash that an external validator uses for comparison against a de-salted credential; this operation performs no salting, lifetime checking, or comparison itself.
flowchart TD
Start([Validator needs an identity hash]) --> Identity[Compute identity hash]
Identity --> Return([Return unsalted identity hash])
Failure and edge-case behavior¶
- There is no in-repo production caller of this operation; it exists for symmetry with the salted/validate path used by an external validating service.*
Related documentation¶
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Sources¶
src/SAIF.NetCore.SystemHash/SAIF.NetCore.SystemHash/SAIF.NetCore.SystemHash/SystemHashService.cs