EarnMorev1.0.0

validateCvv

validateCvv( pan: string, expiry: string, passkey: string, cvv: string, config: ComplianceConfig, ): boolean

Source: cvv.ts:263

Validates a 4-digit CVV, deriving the HMAC key inline. Uses PBKDF2 on each call — use validateCvvFromKey() for frequent validation.

Parameters

  • pan (string) — 16-digit PAN string
  • expiry (string) — "MM/YY" formatted expiry string
  • passkey (string) — The same passkey used to generate the CVV
  • cvv (string) — The 4-digit CVV to validate
  • config (ComplianceConfig) — Optional compliance config (pbkdf2Iterations, keyId, onEvent)

Returns

  • boolean