@Test(expected = IllegalArgumentException.class) public void svUndebitCmdBuild_mode_rev3_2_bad_signature_length_2() { SvUndebitCmdBuild svUndebitCmdBuild = new SvUndebitCmdBuild( PoClass.ISO, PoRevision.REV3_2, 1, (byte) 0xAA, ByteArrayUtil.fromHex("1122"), ByteArrayUtil.fromHex("3344")); svUndebitCmdBuild.finalizeBuilder( ByteArrayUtil.fromHex( "AABBCCDD5566771234561122334455667788")); String apdu = ByteArrayUtil.toHex(svUndebitCmdBuild.getApduRequest().getBytes()); }
public void finalizeBuilder(byte[] undebitComplementaryData) { if ((poRevision == PoRevision.REV3_2 && undebitComplementaryData.length != 20) || (poRevision != PoRevision.REV3_2 && undebitComplementaryData.length != 15)) { throw new IllegalArgumentException("Bad SV prepare load data length."); } byte p1 = undebitComplementaryData[4]; byte p2 = undebitComplementaryData[5]; dataIn[0] = undebitComplementaryData[6]; System.arraycopy(undebitComplementaryData, 0, dataIn, 8, 4); System.arraycopy(undebitComplementaryData, 7, dataIn, 12, 3); System.arraycopy( undebitComplementaryData, 10, dataIn, 15, undebitComplementaryData.length - 10); this.request = setApduRequest(poClass.getValue(), command, p1, p2, dataIn, null); }
SvUndebitCmdBuild extends AbstractPoCommandBuilder<SvUndebitRespPars> { public void finalizeBuilder(byte[] undebitComplementaryData) { if ((poRevision == PoRevision.REV3_2 && undebitComplementaryData.length != 20) || (poRevision != PoRevision.REV3_2 && undebitComplementaryData.length != 15)) { throw new IllegalArgumentException("Bad SV prepare load data length."); } byte p1 = undebitComplementaryData[4]; byte p2 = undebitComplementaryData[5]; dataIn[0] = undebitComplementaryData[6]; System.arraycopy(undebitComplementaryData, 0, dataIn, 8, 4); System.arraycopy(undebitComplementaryData, 7, dataIn, 12, 3); System.arraycopy( undebitComplementaryData, 10, dataIn, 15, undebitComplementaryData.length - 10); this.request = setApduRequest(poClass.getValue(), command, p1, p2, dataIn, null); } }
SvUndebitCmdBuild extends AbstractPoCommandBuilder<SvUndebitRespPars> { public void finalizeBuilder(byte[] undebitComplementaryData) { if ((poRevision == PoRevision.REV3_2 && undebitComplementaryData.length != 20) || (poRevision != PoRevision.REV3_2 && undebitComplementaryData.length != 15)) { throw new IllegalArgumentException("Bad SV prepare load data length."); } byte p1 = undebitComplementaryData[4]; byte p2 = undebitComplementaryData[5]; dataIn[0] = undebitComplementaryData[6]; System.arraycopy(undebitComplementaryData, 0, dataIn, 8, 4); System.arraycopy(undebitComplementaryData, 7, dataIn, 12, 3); System.arraycopy( undebitComplementaryData, 10, dataIn, 15, undebitComplementaryData.length - 10); this.request = setApduRequest(poClass.getValue(), command, p1, p2, dataIn, null); } SvUndebitCmdBuild(
      PoClass poClass, PoRevision poRevision, int amount, byte kvc, byte[] date, byte[] time); }
SvUndebitCmdBuild extends AbstractPoCommandBuilder<SvUndebitRespPars> { public void finalizeBuilder(byte[] undebitComplementaryData) { if ((poRevision == PoRevision.REV3_2 && undebitComplementaryData.length != 20) || (poRevision != PoRevision.REV3_2 && undebitComplementaryData.length != 15)) { throw new IllegalArgumentException("Bad SV prepare load data length."); } byte p1 = undebitComplementaryData[4]; byte p2 = undebitComplementaryData[5]; dataIn[0] = undebitComplementaryData[6]; System.arraycopy(undebitComplementaryData, 0, dataIn, 8, 4); System.arraycopy(undebitComplementaryData, 7, dataIn, 12, 3); System.arraycopy( undebitComplementaryData, 10, dataIn, 15, undebitComplementaryData.length - 10); this.request = setApduRequest(poClass.getValue(), command, p1, p2, dataIn, null); } SvUndebitCmdBuild(
      PoClass poClass, PoRevision poRevision, int amount, byte kvc, byte[] date, byte[] time); void finalizeBuilder(byte[] undebitComplementaryData); byte[] getSvUndebitData(); @Override SvUndebitRespPars createResponseParser(ApduResponse apduResponse); @Override boolean isSessionBufferUsed(); }
SvUndebitCmdBuild extends AbstractPoCommandBuilder<SvUndebitRespPars> { public void finalizeBuilder(byte[] undebitComplementaryData) { if ((poRevision == PoRevision.REV3_2 && undebitComplementaryData.length != 20) || (poRevision != PoRevision.REV3_2 && undebitComplementaryData.length != 15)) { throw new IllegalArgumentException("Bad SV prepare load data length."); } byte p1 = undebitComplementaryData[4]; byte p2 = undebitComplementaryData[5]; dataIn[0] = undebitComplementaryData[6]; System.arraycopy(undebitComplementaryData, 0, dataIn, 8, 4); System.arraycopy(undebitComplementaryData, 7, dataIn, 12, 3); System.arraycopy( undebitComplementaryData, 10, dataIn, 15, undebitComplementaryData.length - 10); this.request = setApduRequest(poClass.getValue(), command, p1, p2, dataIn, null); } SvUndebitCmdBuild(
      PoClass poClass, PoRevision poRevision, int amount, byte kvc, byte[] date, byte[] time); void finalizeBuilder(byte[] undebitComplementaryData); byte[] getSvUndebitData(); @Override SvUndebitRespPars createResponseParser(ApduResponse apduResponse); @Override boolean isSessionBufferUsed();  }