Skip to content

Commit

Permalink
Merge pull request #615 from tilln/feature-next/arqc-padding-fix
Browse files Browse the repository at this point in the history
Fix CVN18 ARQC padding method
  • Loading branch information
ar authored Sep 19, 2024
2 parents 722ce85 + 6e4cd08 commit 8cc2f59
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ public String buildARQCRequest(TLVList data, IssuerApplicationData iad) {

@Override
public PaddingMethod getPaddingMethod() {
return PaddingMethod.ISO9797Method1;
return PaddingMethod.ISO9797Method2;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,9 @@ void testBuildARQCRequest() {
"00000000010000000000000008400000000000084018123101ABCDEF101800000203000000",
builder.buildARQCRequest(data, iad)
);

assertEquals(
"00000000010000000000000008400000000000084018123101ABCDEF101800000203000000000000",
builder.buildARQCRequest_padded(data, iad)
);


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,9 @@ void testBuildARQCRequest() {
"00000000010000000000000008400000000000084018123101ABCDEF101800000106011203000000",
builder.buildARQCRequest(data, iad)
);

assertEquals(
"00000000010000000000000008400000000000084018123101ABCDEF101800000106011203000000",
"00000000010000000000000008400000000000084018123101ABCDEF1018000001060112030000008000000000000000",
builder.buildARQCRequest_padded(data, iad)
);


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,9 @@ void testBuildARQCRequest() {
"00000000010000000000000008400000000000084018123101ABCDEF10180000011F22010300000000000000000000000000000000000000000000000000000000",
builder.buildARQCRequest(data, iad)
);
assertEquals(
"00000000010000000000000008400000000000084018123101ABCDEF10180000011F2201030000000000000000000000000000000000000000000000000000000080000000000000",
builder.buildARQCRequest_padded(data, iad)
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ void testBuildARQCRequest() {
"0000000100000000000010000840000000108008409807040011111111580034560FA500A03800000000000000000000000F010000000000000000000000000000",
builder.buildARQCRequest(data, iad)
);

assertEquals(
"0000000100000000000010000840000000108008409807040011111111580034560FA500A03800000000000000000000000F01000000000000000000000000000080000000000000",
builder.buildARQCRequest_padded(data, iad)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ void buildARPCRequest() {
"000000010000000000001000084000000010800840980704001111111158003456608003220000",
builder.buildARQCRequest(data, iad)
);

assertEquals(
"00000001000000000000100008400000001080084098070400111111115800345660800322000080",
builder.buildARQCRequest_padded(data, iad)
);
}


}

0 comments on commit 8cc2f59

Please sign in to comment.