Skip to content

Commit

Permalink
Add VGS_FIXED_LEN_GENERIC alias format support (#184)
Browse files Browse the repository at this point in the history
* Add VGS_FIXED_LEN_GENERIC format

* Update test_default_vault.star
  • Loading branch information
mksh authored Oct 7, 2021
1 parent 440419b commit ea0adcf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public class VaultModule implements LarkyVault {
"FPE_ACC_NUM_T_FOUR",
"FPE_ALPHANUMERIC_ACC_NUM_T_FOUR",
"GENERIC_T_FOUR",
"ALPHANUMERIC_SIX_T_FOUR"
"ALPHANUMERIC_SIX_T_FOUR",
"VGS_FIXED_LEN_GENERIC"
);

public VaultModule() {
Expand Down Expand Up @@ -173,4 +174,4 @@ private void validateFormat(Object format) throws EvalException {
}
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def _test_unknown_format():
asserts.assert_fails(lambda : vault.redact(card_number, format="unknown"),
"Format 'unknown' not found in supported format types: " +
"\\[RAW_UUID, UUID, NUM_LENGTH_PRESERVING, PFPT, FPE_SIX_T_FOUR, FPE_T_FOUR, NON_LUHN_FPE_ALPHANUMERIC, " +
"FPE_SSN_T_FOUR, FPE_ACC_NUM_T_FOUR, FPE_ALPHANUMERIC_ACC_NUM_T_FOUR, GENERIC_T_FOUR, ALPHANUMERIC_SIX_T_FOUR\\]"
"FPE_SSN_T_FOUR, FPE_ACC_NUM_T_FOUR, FPE_ALPHANUMERIC_ACC_NUM_T_FOUR, GENERIC_T_FOUR, ALPHANUMERIC_SIX_T_FOUR, VGS_FIXED_LEN_GENERIC\\]"
)

def _test_unsupported_format():
Expand Down

0 comments on commit ea0adcf

Please sign in to comment.