@Test public void refDoTest() throws CardException { byte[] data = new byte[AramConstTest.VALID_REF_DO.length]; assertEquals(AramConstTest.VALID_REF_DO.length, AramUtils.buildRefDo(DEFAULT_DATA_OFFSET, DEFAULT_DATA_OFFSET_MAX, data, (short) 0, entry)); assertArrayEquals(AramConstTest.VALID_REF_DO, data); }
public static byte buildRefDo(short dataOffset, short dataOffsetMax, byte[] buf, short ofs, RuleEntry entry) { if (ofs >= dataOffset && ofs < dataOffsetMax) { buf[(short) (ofs - dataOffset)] = (byte) 0xE1; } ofs++; byte aidRefDoLen = buildAidRefDo(dataOffset, dataOffsetMax, buf, (short) (ofs + 1), entry); byte hashRefDoLen = buildHashRefDo(dataOffset, dataOffsetMax, buf, (short) (ofs + aidRefDoLen + 1), entry); if (ofs >= dataOffset && ofs < dataOffsetMax) { buf[(short) (ofs - dataOffset)] = (byte) (aidRefDoLen + hashRefDoLen); } return (byte) (aidRefDoLen + hashRefDoLen + 2); }
AramUtils { public static byte buildRefDo(short dataOffset, short dataOffsetMax, byte[] buf, short ofs, RuleEntry entry) { if (ofs >= dataOffset && ofs < dataOffsetMax) { buf[(short) (ofs - dataOffset)] = (byte) 0xE1; } ofs++; byte aidRefDoLen = buildAidRefDo(dataOffset, dataOffsetMax, buf, (short) (ofs + 1), entry); byte hashRefDoLen = buildHashRefDo(dataOffset, dataOffsetMax, buf, (short) (ofs + aidRefDoLen + 1), entry); if (ofs >= dataOffset && ofs < dataOffsetMax) { buf[(short) (ofs - dataOffset)] = (byte) (aidRefDoLen + hashRefDoLen); } return (byte) (aidRefDoLen + hashRefDoLen + 2); } }
AramUtils { public static byte buildRefDo(short dataOffset, short dataOffsetMax, byte[] buf, short ofs, RuleEntry entry) { if (ofs >= dataOffset && ofs < dataOffsetMax) { buf[(short) (ofs - dataOffset)] = (byte) 0xE1; } ofs++; byte aidRefDoLen = buildAidRefDo(dataOffset, dataOffsetMax, buf, (short) (ofs + 1), entry); byte hashRefDoLen = buildHashRefDo(dataOffset, dataOffsetMax, buf, (short) (ofs + aidRefDoLen + 1), entry); if (ofs >= dataOffset && ofs < dataOffsetMax) { buf[(short) (ofs - dataOffset)] = (byte) (aidRefDoLen + hashRefDoLen); } return (byte) (aidRefDoLen + hashRefDoLen + 2); }  }
AramUtils { public static byte buildRefDo(short dataOffset, short dataOffsetMax, byte[] buf, short ofs, RuleEntry entry) { if (ofs >= dataOffset && ofs < dataOffsetMax) { buf[(short) (ofs - dataOffset)] = (byte) 0xE1; } ofs++; byte aidRefDoLen = buildAidRefDo(dataOffset, dataOffsetMax, buf, (short) (ofs + 1), entry); byte hashRefDoLen = buildHashRefDo(dataOffset, dataOffsetMax, buf, (short) (ofs + aidRefDoLen + 1), entry); if (ofs >= dataOffset && ofs < dataOffsetMax) { buf[(short) (ofs - dataOffset)] = (byte) (aidRefDoLen + hashRefDoLen); } return (byte) (aidRefDoLen + hashRefDoLen + 2); }  static byte buildRefArDo(short dataOffset, short dataOffsetMax, byte[] buf, short ofs, RuleEntry entry); static byte buildRefDo(short dataOffset, short dataOffsetMax, byte[] buf, short ofs, RuleEntry entry); static byte buildArDo(short dataOffset, short dataOffsetMax, byte[] buf, short ofs, RuleEntry entry); static byte buildAidRefDo(short dataOffset, short dataOffsetMax, byte[] buf, short ofs, RuleEntry entry); static byte buildHashRefDo(short dataOffset, short dataOffsetMax, byte[] buf, short ofs, RuleEntry entry); }
AramUtils { public static byte buildRefDo(short dataOffset, short dataOffsetMax, byte[] buf, short ofs, RuleEntry entry) { if (ofs >= dataOffset && ofs < dataOffsetMax) { buf[(short) (ofs - dataOffset)] = (byte) 0xE1; } ofs++; byte aidRefDoLen = buildAidRefDo(dataOffset, dataOffsetMax, buf, (short) (ofs + 1), entry); byte hashRefDoLen = buildHashRefDo(dataOffset, dataOffsetMax, buf, (short) (ofs + aidRefDoLen + 1), entry); if (ofs >= dataOffset && ofs < dataOffsetMax) { buf[(short) (ofs - dataOffset)] = (byte) (aidRefDoLen + hashRefDoLen); } return (byte) (aidRefDoLen + hashRefDoLen + 2); }  static byte buildRefArDo(short dataOffset, short dataOffsetMax, byte[] buf, short ofs, RuleEntry entry); static byte buildRefDo(short dataOffset, short dataOffsetMax, byte[] buf, short ofs, RuleEntry entry); static byte buildArDo(short dataOffset, short dataOffsetMax, byte[] buf, short ofs, RuleEntry entry); static byte buildAidRefDo(short dataOffset, short dataOffsetMax, byte[] buf, short ofs, RuleEntry entry); static byte buildHashRefDo(short dataOffset, short dataOffsetMax, byte[] buf, short ofs, RuleEntry entry);  }