Skip to content

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

  1. Compute the deterministic identity hash for type and systemName (BR-SH-01, BR-SH-02):
  2. Build the identity string "{systemName}-{(int)type}", using the SystemType enum's integer ordinal, not its name.
  3. Encode the identity string as UTF-16LE bytes (Encoding.Unicode.GetBytes).
  4. Compute the SHA-256 digest of those bytes.
  5. 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.*

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