Skip to content
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

Fix CVN18 ARQC padding method #614

Merged
merged 11 commits into from
Sep 19, 2024
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)
);
}


}
Loading