Skip to content

Commit

Permalink
Javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Dec 14, 2023
1 parent 99347bf commit 169e57b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/apache/commons/crypto/utils/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
*/
public final class Utils {

/** mask to keep a byte from a longer number */
/** Mask to keep a byte from a longer number */
public static final int BYTE_MASK = 0xFF;

/** maximum number of OpenSslVersion entries to retrieve */
/** Maximum number of OpenSslVersion entries to retrieve */
public static final int OPENSSL_VERSION_MAX_INDEX = 20; // max seen so far is 9, but leave some spare

private static final class DefaultPropertiesHolder {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public abstract class AbstractCipherTest {

private CryptoCipher enc, dec;

/** test byte array whose data is randomly generated */
/** Test byte array whose data is randomly generated */
private void byteArrayTest(final String transformation, final byte[] key, final byte[] iv) throws Exception {
final int blockSize = enc.getBlockSize();

Expand Down Expand Up @@ -116,7 +116,7 @@ private void byteArrayTest(final String transformation, final byte[] key, final
}
}

/** test byte array whose data is planned in {@link TestData} */
/** Test byte array whose data is planned in {@link TestData} */
private void byteArrayTest(final String transformation, final byte[] key, final byte[] iv, final byte[] input,
final byte[] output) throws Exception {
resetCipher(transformation, key, iv);
Expand Down Expand Up @@ -237,7 +237,7 @@ public void testCloseTestRepeat() throws Exception {
@Test
public void testCryptoTest() throws Exception {
for (final String tran : transformations) {
/** uses the small data set in {@link TestData} */
/** Uses the small data set in {@link TestData} */
cipherTests = TestData.getTestData(tran);
assertNotNull(cipherTests, "TestData cannot supply data for: " + tran);
for (int i = 0; i != cipherTests.length; i += 5) {
Expand All @@ -258,7 +258,7 @@ public void testCryptoTest() throws Exception {
byteArrayTest(tran, key, iv, inputBytes, outputBytes);
}

/** uses randomly generated big data set */
/** Uses randomly generated big data set */
byteArrayTest(tran, KEY, IV);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public void before() throws IOException {
prepareData();
}

/** compare the data from pos with length and data2 from 0 with length. */
/** Compares the data from pos with length and data2 from 0 with length. */
private void compareByteArray(final byte[] data1, final int pos, final byte[] data2,
final int length) {
final byte[] expectedData = new byte[length];
Expand Down Expand Up @@ -353,7 +353,7 @@ private void testPositionedReadLoop(final String cipherClass, int position,
}
}

/** test for the out of index position, eg, -1. */
/** Tests for the out of index position, eg, -1. */
private void testPositionedReadNone(final String cipherClass, final int position,
final int length, final int bufferSize) throws Exception {
try (CryptoCipher cipher = getCipher(cipherClass);
Expand All @@ -364,7 +364,7 @@ private void testPositionedReadNone(final String cipherClass, final int position
}
}

/** test for the End of file reached before reading fully. */
/** Tests for the End of file reached before reading fully. */
private void testReadFullyFailed(final String cipherClass, final int position,
final int length, final int bufferSize) throws Exception {
try (CryptoCipher cipher = getCipher(cipherClass);
Expand Down Expand Up @@ -392,7 +392,7 @@ private void testReadFullyLoop(final String cipherClass, int position,
}
}

/** test for the out of index position, eg, -1. */
/** Tests for the out of index position, eg, -1. */
private void testSeekFailed(final String cipherClass, final int position, final int bufferSize)
throws Exception {
try (CryptoCipher cipher = getCipher(cipherClass);
Expand Down

0 comments on commit 169e57b

Please sign in to comment.