EarnMorev1.0.0

maskPAN

maskPAN(pan: string): string

Source: masking.ts:32

Masks a 16-digit PAN per PCI-DSS Req 3.5.

Format: first 6 digits (BIN/IIN) + 6 masked chars + last 4 digits. The 6 masked characters in the middle are shown as lowercase 'x'.

Example: "0011382910471836" → "001138xxxxxx1836"

Parameters

  • pan (string) — 16-digit PAN string (digits only)

Returns

  • string — Masked PAN string

Throws

  • If PAN is not exactly 16 digits