feat: detect account number, BIK, card expiry, OGRN(IP), KPP, income, biometrics

Types the spec asks for beyond the payment card itself: settlement
account (20 digits), BIK, card expiry date (kept separate from
birth date), OGRN/OGRNIP (negative lookahead so OGRNIP isn't half-
swallowed by the OGRN rule), KPP, income/salary amounts, and mentions
of biometric enrollment (ЕБС, voice/fingerprint templates).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Максименко Никита Владимирович
2026-09-21 21:29:57 +03:00
co-authored by Claude Sonnet 5
parent e52e9550e6
commit 495cf08a05
3 changed files with 142 additions and 1 deletions
+11 -1
View File
@@ -57,7 +57,17 @@ public class Masker {
Map.entry(RuleRegistry.ADDRESS_HOUSE, Strategies::stars),
Map.entry(RuleRegistry.ADDRESS_FLAT, Strategies::stars),
Map.entry(RuleRegistry.BIRTH_PLACE, Strategies::stars),
Map.entry(RuleRegistry.CITIZENSHIP, Strategies::stars)
Map.entry(RuleRegistry.CITIZENSHIP, Strategies::stars),
Map.entry(RuleRegistry.ACCOUNT_NUMBER, EDGES),
Map.entry(RuleRegistry.OGRN, EDGES),
Map.entry(RuleRegistry.OGRNIP, EDGES),
Map.entry(RuleRegistry.KPP, EDGES),
// Срок действия карты — разделитель виден, сам месяц/год нет.
Map.entry(RuleRegistry.CARD_EXPIRY, Strategies::starsKeepingPunctuation),
Map.entry(RuleRegistry.BIK, Strategies::stars),
Map.entry(RuleRegistry.INCOME, Strategies::stars),
Map.entry(RuleRegistry.BIOMETRIC, Strategies::stars)
);
public String mask(String type, String value, MaskMode mode, MaskContext context) {