Comments (5)
@mchhil-incomm at your convenience, please check f66f287 sent against next
. If you think it solves the issue, we can back port it to master
. I also took the opportunity to remove a few tests that would break with this change, but made no sense.
from jpos.
@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?
from jpos.
Oh... protect0
was just placed as a reference while coding the protect
:) — I'll take it away.
from jpos.
@ar The test case does not look right. For clarity you can try "=====^apr/apr^====^==="
@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 ^
has not changed because the following check
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.
from jpos.
@mchhil-incomm the track1 "=====^apr/apr^====^===" looks invalid to me to start with. That would be a six digits card number, which looks invalid.
For regression, it would be good to test the old output equals the new one.
I think some of the old tests were just wrong, hence adjusted.
from jpos.
Related Issues (20)
- Memory Leak in TransactionManager's redeployed participants
- QMUX Sequencing Issue HOT 3
- SimpleKeyFile.getKeys() seems to load the key file for every key.
- Q2.deployElement doesn't write the destination file atomically, which can make the deploy polling to fail HOT 2
- using BERTLVAsciiHexPackager and AsciiHexInterpreter returns incorrect uninterpretLength HOT 5
- Channel Class that wraps the JMS objects HOT 1
- Help validate ARQC using JCESecurityModule HOT 4
- When two Q2 services are connected, the response content cannot be received. HOT 1
- 2.1.9 - Compatibility with JDK8 HOT 1
- About the rotation of q2 logs HOT 1
- ChannelAdaptor potentially unsafe synchronization HOT 2
- QMUX key pcode attribute HOT 1
- Can't build jPOS
- The risk of XSLT injection in jPOS can lead to Remote Code Execution (RCE).
- What is the output of Gradle build? HOT 1
- Make sure just one Logger can redirect stdout/stderr
- EMV TLV Parser HOT 2
- ISOServer usable channels
- Log folder does not exist, causing silent failure at start up HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jpos.