Derive a stable 10-digit SATIM order number from a merchant reference.
Maps the first 48 bits of SHA-256 into the inclusive-exclusive range
[1_000_000_000, 10_000_000_000), satisfying SATIM's orderNumber
format constraint (AN.10). Same inputs always produce the same output.
Modulo bias: 2^48 mod 9_000_000_000 ≠ 0, so output values are not
perfectly uniform. The bias is ~3% (some 10-digit numbers appear 32
times across the 2^48 input space while others appear 31). Acceptable
for order-number derivation; not suitable for cryptographic primitives.
Derive a stable 10-digit SATIM order number from a merchant reference.
Maps the first 48 bits of SHA-256 into the inclusive-exclusive range
[1_000_000_000, 10_000_000_000), satisfying SATIM'sorderNumberformat constraint (AN.10). Same inputs always produce the same output.Modulo bias:
2^48 mod 9_000_000_000 ≠ 0, so output values are not perfectly uniform. The bias is ~3% (some 10-digit numbers appear 32 times across the 2^48 input space while others appear 31). Acceptable for order-number derivation; not suitable for cryptographic primitives.