-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Protect name in Track1 of the ISOUtil.protect #579
Comments
@mchhil-incomm at your convenience, please check f66f287 sent against |
@ar your protect0 is what I have implemented and is being used by other projects here internally. As for the protect method, I believe your test case covers it. Should there be a test case to make sure results of protect0 and protect yield identical results? |
Oh... |
@ar The test case does not look right. For clarity you can try @Test
public void testProtect10() throws Throwable {
String result = ISOUtil.protect("=====^===========^====^===");
assertEquals("=====^===========^====^===", result, "result");
} The name is not masked in it, unless its a special kind of track data that I am not aware of. The data after the first if (firstSeparatorIndex < 6) {
return s; // nothing to do
} The old method would have returned
for an input of For regression, it would be good to test the old output equals the new one. |
@mchhil-incomm the track1 "=====^apr/apr^====^===" looks invalid to me to start with. That would be a six digits card number, which looks invalid.
|
Output
John/Doe is not protected.
Change
https://github.com/jpos/jPOS/blob/master/jpos/src/main/java/org/jpos/iso/ISOUtil.java#L929-L938
to
Output
The text was updated successfully, but these errors were encountered: