This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-crypto.git
The following commit(s) were added to refs/heads/master by this push:
new a4639c60 Javadoc
a4639c60 is described below
commit a4639c60b6e1644286cba4cd0ed95f87b7f1c345
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Jul 11 11:21:55 2026 -0400
Javadoc
---
.../apache/commons/crypto/NativeCodeLoader.java | 6 +-
.../java/org/apache/commons/crypto/OsInfo.java | 6 +-
.../apache/commons/crypto/cipher/CryptoCipher.java | 34 +++++-----
.../commons/crypto/cipher/CryptoCipherFactory.java | 6 +-
.../apache/commons/crypto/cipher/JceCipher.java | 34 +++++-----
.../org/apache/commons/crypto/cipher/OpenSsl.java | 44 ++++++------
.../commons/crypto/cipher/OpenSslCipher.java | 34 +++++-----
.../commons/crypto/cipher/OpenSslNative.java | 2 +-
.../commons/crypto/jna/OpenSslJnaCipher.java | 40 +++++------
.../commons/crypto/jna/OpenSslJnaCryptoRandom.java | 6 +-
.../apache/commons/crypto/random/CryptoRandom.java | 2 +-
.../commons/crypto/random/CryptoRandomFactory.java | 4 +-
.../commons/crypto/random/JavaCryptoRandom.java | 4 +-
.../commons/crypto/random/OpenSslCryptoRandom.java | 4 +-
.../crypto/random/OpenSslCryptoRandomNative.java | 2 +-
.../commons/crypto/random/OsCryptoRandom.java | 6 +-
.../commons/crypto/stream/CryptoInputStream.java | 50 +++++++-------
.../commons/crypto/stream/CryptoOutputStream.java | 44 ++++++------
.../crypto/stream/CtrCryptoInputStream.java | 78 +++++++++++-----------
.../crypto/stream/CtrCryptoOutputStream.java | 58 ++++++++--------
.../crypto/stream/PositionedCryptoInputStream.java | 78 +++++++++++-----------
.../commons/crypto/stream/input/ChannelInput.java | 14 ++--
.../apache/commons/crypto/stream/input/Input.java | 12 ++--
.../commons/crypto/stream/input/StreamInput.java | 16 ++---
.../crypto/stream/output/ChannelOutput.java | 2 +-
.../commons/crypto/stream/output/StreamOutput.java | 4 +-
.../java/org/apache/commons/crypto/utils/AES.java | 2 +-
.../org/apache/commons/crypto/utils/IoUtils.java | 20 +++---
.../org/apache/commons/crypto/utils/Padding.java | 2 +-
.../commons/crypto/utils/ReflectionUtils.java | 6 +-
.../commons/crypto/utils/Transformation.java | 12 ++--
.../org/apache/commons/crypto/utils/Utils.java | 20 +++---
.../crypto/examples/CipherByteArrayExample.java | 2 +-
.../crypto/examples/CipherByteBufferExample.java | 2 +-
.../commons/crypto/examples/StreamExample.java | 2 +-
35 files changed, 329 insertions(+), 329 deletions(-)
diff --git a/src/main/java/org/apache/commons/crypto/NativeCodeLoader.java
b/src/main/java/org/apache/commons/crypto/NativeCodeLoader.java
index eb1fbc37..ddb5c298 100644
--- a/src/main/java/org/apache/commons/crypto/NativeCodeLoader.java
+++ b/src/main/java/org/apache/commons/crypto/NativeCodeLoader.java
@@ -76,8 +76,8 @@ private static void debug(final String format, final
Object... args) {
/**
* Extracts the specified library file to the target folder.
*
- * @param libFolderForCurrentOS the library in commons-crypto.lib.path.
- * @param libraryFileName the library name.
+ * @param libFolderForCurrentOS The library in commons-crypto.lib.path.
+ * @param libraryFileName The library name.
* @param targetFolder Target folder for the native lib. Use the
value
* of commons-crypto.tempdir or
java.io.tmpdir.
* @return The library file.
@@ -210,7 +210,7 @@ static Throwable getLoadingError() {
/**
* Checks whether the given path has resource.
*
- * @param path the path.
+ * @param path The path.
* @return The boolean.
*/
private static boolean hasResource(final String path) {
diff --git a/src/main/java/org/apache/commons/crypto/OsInfo.java
b/src/main/java/org/apache/commons/crypto/OsInfo.java
index aa45f222..9928f48c 100644
--- a/src/main/java/org/apache/commons/crypto/OsInfo.java
+++ b/src/main/java/org/apache/commons/crypto/OsInfo.java
@@ -163,7 +163,7 @@ static String getOsNameProperty() {
/**
* The main method. This is used by the JNI make processing in {@code
Makefile.common}
*
- * @param args the argv.
+ * @param args The argv.
*/
public static void main(final String[] args) {
if (args.length >= 1) {
@@ -183,7 +183,7 @@ public static void main(final String[] args) {
/**
* Translates the architecture name to folder name.
*
- * @param archName the architecture name.
+ * @param archName The architecture name.
* @return The folder name.
*/
private static String translateArchNameToFolderName(final String archName)
{
@@ -193,7 +193,7 @@ private static String translateArchNameToFolderName(final
String archName) {
/**
* Translates the OS name to folder name.
*
- * @param osName the OS name.
+ * @param osName The OS name.
* @return The folder name.
*/
private static String translateOSNameToFolderName(final String osName) {
diff --git a/src/main/java/org/apache/commons/crypto/cipher/CryptoCipher.java
b/src/main/java/org/apache/commons/crypto/cipher/CryptoCipher.java
index ee7e0ad4..0fbc2a83 100644
--- a/src/main/java/org/apache/commons/crypto/cipher/CryptoCipher.java
+++ b/src/main/java/org/apache/commons/crypto/cipher/CryptoCipher.java
@@ -41,11 +41,11 @@ public interface CryptoCipher extends Closeable {
* Encrypts or decrypts data in a single-part operation, or finishes a
* multiple-part operation.
*
- * @param input the input byte array
- * @param inputOffset the offset in input where the input starts
- * @param inputLen the input length
- * @param output the byte array for the result
- * @param outputOffset the offset in output where the result is stored
+ * @param input The input byte array
+ * @param inputOffset The offset in input where the input starts
+ * @param inputLen The input length
+ * @param output The byte array for the result
+ * @param outputOffset The offset in output where the result is stored
* @return The number of bytes stored in output
* @throws ShortBufferException if the given output byte array is too small
* to hold the result
@@ -66,8 +66,8 @@ int doFinal(byte[] input, int inputOffset, int inputLen,
byte[] output,
* Encrypts or decrypts data in a single-part operation, or finishes a
* multiple-part operation.
*
- * @param inBuffer the input ByteBuffer
- * @param outBuffer the output ByteBuffer
+ * @param inBuffer The input ByteBuffer
+ * @param outBuffer The output ByteBuffer
* @return int number of bytes stored in {@code output}
* @throws BadPaddingException if this cipher is in decryption mode, and
* (un)padding has been requested, but the decrypted data is not
@@ -111,7 +111,7 @@ int doFinal(ByteBuffer inBuffer, ByteBuffer outBuffer)
* @param mode {@link javax.crypto.Cipher#ENCRYPT_MODE} or
* {@link javax.crypto.Cipher#DECRYPT_MODE}
* @param key crypto key for the cipher
- * @param params the algorithm parameters
+ * @param params The algorithm parameters
* @throws InvalidKeyException if the given key is inappropriate for
* initializing this cipher, or its keysize exceeds the maximum
* allowable keysize (as determined from the configured
jurisdiction
@@ -130,11 +130,11 @@ void init(int mode, Key key, AlgorithmParameterSpec
params)
* Continues a multiple-part encryption/decryption operation. The data is
* encrypted or decrypted, depending on how this cipher was initialized.
*
- * @param input the input byte array
- * @param inputOffset the offset in input where the input starts
- * @param inputLen the input length
- * @param output the byte array for the result
- * @param outputOffset the offset in output where the result is stored
+ * @param input The input byte array
+ * @param inputOffset The offset in input where the input starts
+ * @param inputLen The input length
+ * @param output The byte array for the result
+ * @param outputOffset The offset in output where the result is stored
* @return The number of bytes stored in output
* @throws ShortBufferException if there is insufficient space in the
output
* byte array
@@ -146,8 +146,8 @@ int update(byte[] input, int inputOffset, int inputLen,
byte[] output,
* Continues a multiple-part encryption/decryption operation. The data is
* encrypted or decrypted, depending on how this cipher was initialized.
*
- * @param inBuffer the input ByteBuffer
- * @param outBuffer the output ByteBuffer
+ * @param inBuffer The input ByteBuffer
+ * @param outBuffer The output ByteBuffer
* @return int number of bytes stored in {@code output}
* @throws ShortBufferException if there is insufficient space in the
output
* buffer
@@ -166,7 +166,7 @@ int update(ByteBuffer inBuffer, ByteBuffer outBuffer)
* {@code doFinal} methods).
* </p>
*
- * @param aad the buffer containing the Additional Authentication Data
+ * @param aad The buffer containing the Additional Authentication Data
* @throws IllegalArgumentException if the {@code aad}
* byte array is null
* @throws IllegalStateException if this cipher is in a wrong state
@@ -193,7 +193,7 @@ default void updateAAD(final byte[] aad)
* {@code doFinal} methods).
* </p>
*
- * @param aad the buffer containing the Additional Authentication Data
+ * @param aad The buffer containing the Additional Authentication Data
* @throws IllegalArgumentException if the {@code aad}
* byte array is null
* @throws IllegalStateException if this cipher is in a wrong state
diff --git
a/src/main/java/org/apache/commons/crypto/cipher/CryptoCipherFactory.java
b/src/main/java/org/apache/commons/crypto/cipher/CryptoCipherFactory.java
index f8f56c36..06c9fd4c 100644
--- a/src/main/java/org/apache/commons/crypto/cipher/CryptoCipherFactory.java
+++ b/src/main/java/org/apache/commons/crypto/cipher/CryptoCipherFactory.java
@@ -79,7 +79,7 @@ public enum CipherProvider {
/**
* The private constructor.
*
- * @param klass the Class of CryptoCipher
+ * @param klass The Class of CryptoCipher
*/
CipherProvider(final Class<? extends CryptoCipher> klass) {
this.klass = klass;
@@ -163,7 +163,7 @@ private static String getCipherClassString(final Properties
props) {
* Gets a cipher for algorithm/mode/padding in config value
* commons.crypto.cipher.transformation
*
- * @param transformation the name of the transformation, e.g.,
+ * @param transformation The name of the transformation, e.g.,
* <em>AES/CBC/PKCS5Padding</em>.
* See the Java Cryptography Architecture Standard Algorithm Name
Documentation
* for information about standard transformation names.
@@ -178,7 +178,7 @@ public static CryptoCipher getCryptoCipher(final String
transformation)
/**
* Gets a cipher instance for specified algorithm/mode/padding.
*
- * @param properties the configuration properties - uses {@link
#CLASSES_KEY}
+ * @param properties The configuration properties - uses {@link
#CLASSES_KEY}
* @param transformation algorithm/mode/padding
* @return CryptoCipher the cipher (defaults to OpenSslCipher)
* @throws GeneralSecurityException if cipher initialize failed
diff --git a/src/main/java/org/apache/commons/crypto/cipher/JceCipher.java
b/src/main/java/org/apache/commons/crypto/cipher/JceCipher.java
index ecb1e5b5..bd58b838 100644
--- a/src/main/java/org/apache/commons/crypto/cipher/JceCipher.java
+++ b/src/main/java/org/apache/commons/crypto/cipher/JceCipher.java
@@ -66,11 +66,11 @@ public void close() {
* Encrypts or decrypts data in a single-part operation, or finishes a
* multiple-part operation.
*
- * @param input the input byte array
- * @param inputOffset the offset in input where the input starts
- * @param inputLen the input length
- * @param output the byte array for the result
- * @param outputOffset the offset in output where the result is stored
+ * @param input The input byte array
+ * @param inputOffset The offset in input where the input starts
+ * @param inputLen The input length
+ * @param output The byte array for the result
+ * @param outputOffset The offset in output where the result is stored
* @return The number of bytes stored in output
* @throws ShortBufferException if the given output byte array is too small
* to hold the result
@@ -96,8 +96,8 @@ public int doFinal(final byte[] input, final int inputOffset,
final int inputLen
* multiple-part operation. The data is encrypted or decrypted, depending
on
* how this cipher was initialized.
*
- * @param inBuffer the input ByteBuffer
- * @param outBuffer the output ByteBuffer
+ * @param inBuffer The input ByteBuffer
+ * @param outBuffer The output ByteBuffer
* @return int number of bytes stored in {@code output}
* @throws BadPaddingException if this cipher is in decryption mode, and
* (un)padding has been requested, but the decrypted data is not
@@ -149,7 +149,7 @@ public int getBlockSize() {
*
* @param mode {@link Cipher#ENCRYPT_MODE} or {@link Cipher#DECRYPT_MODE}
* @param key crypto key for the cipher
- * @param params the algorithm parameters
+ * @param params The algorithm parameters
* @throws InvalidAlgorithmParameterException if the given algorithm
* parameters are inappropriate for this cipher, or this cipher
* requires algorithm parameters and {@code params} is {@code
null}, or
@@ -171,11 +171,11 @@ public void init(final int mode, final Key key, final
AlgorithmParameterSpec par
* Continues a multiple-part encryption/decryption operation. The data is
* encrypted or decrypted, depending on how this cipher was initialized.
*
- * @param input the input byte array
- * @param inputOffset the offset in input where the input starts
- * @param inputLen the input length
- * @param output the byte array for the result
- * @param outputOffset the offset in output where the result is stored
+ * @param input The input byte array
+ * @param inputOffset The offset in input where the input starts
+ * @param inputLen The input length
+ * @param output The byte array for the result
+ * @param outputOffset The offset in output where the result is stored
* @return The number of bytes stored in output
* @throws ShortBufferException if there is insufficient space in the
output
* byte array
@@ -191,8 +191,8 @@ public int update(final byte[] input, final int
inputOffset, final int inputLen,
* Continues a multiple-part encryption/decryption operation. The data is
* encrypted or decrypted, depending on how this cipher was initialized.
*
- * @param inBuffer the input ByteBuffer
- * @param outBuffer the output ByteBuffer
+ * @param inBuffer The input ByteBuffer
+ * @param outBuffer The output ByteBuffer
* @return int number of bytes stored in {@code output}
* @throws ShortBufferException if there is insufficient space in the
output
* buffer
@@ -214,7 +214,7 @@ public int update(final ByteBuffer inBuffer, final
ByteBuffer outBuffer)
* {@code doFinal} methods).
* </p>
*
- * @param aad the buffer containing the Additional Authentication Data
+ * @param aad The buffer containing the Additional Authentication Data
* @throws IllegalArgumentException if the {@code aad}
* byte array is {@code null}
* @throws IllegalStateException if this cipher is in a wrong state
@@ -241,7 +241,7 @@ public void updateAAD(final byte[] aad) {
* {@code doFinal} methods).
* </p>
*
- * @param aad the buffer containing the Additional Authentication Data
+ * @param aad The buffer containing the Additional Authentication Data
* @throws IllegalArgumentException if the {@code aad}
* byte array is {@code null}
* @throws IllegalStateException if this cipher is in a wrong state
diff --git a/src/main/java/org/apache/commons/crypto/cipher/OpenSsl.java
b/src/main/java/org/apache/commons/crypto/cipher/OpenSsl.java
index c936c8e7..4dead5a1 100644
--- a/src/main/java/org/apache/commons/crypto/cipher/OpenSsl.java
+++ b/src/main/java/org/apache/commons/crypto/cipher/OpenSsl.java
@@ -44,8 +44,8 @@ private enum AlgorithmMode {
/**
* Gets the mode.
*
- * @param algorithm the algorithm.
- * @param mode the mode.
+ * @param algorithm The algorithm.
+ * @param mode The mode.
* @return The Algorithm mode.
* @throws NoSuchAlgorithmException if the algorithm is not available.
*/
@@ -83,7 +83,7 @@ static int get(final String algorithm, final String mode)
throws NoSuchAlgorithm
* Gets an {@code OpenSslCipher} that implements the specified
* transformation.
*
- * @param transformation the name of the transformation, e.g.,
+ * @param transformation The name of the transformation, e.g.,
* AES/CTR/NoPadding.
* @return OpenSslCipher an {@code OpenSslCipher} object
* @throws NoSuchAlgorithmException if {@code transformation} is {@code
null},
@@ -119,9 +119,9 @@ public static Throwable getLoadingFailureReason() {
/**
* Constructs a {@link OpenSsl} instance based on context, algorithm and
padding.
*
- * @param context the context.
- * @param algorithm the algorithm.
- * @param padding the padding.
+ * @param context The context.
+ * @param algorithm The algorithm.
+ * @param padding The padding.
*/
private OpenSsl(final long context, final int algorithm, final int
padding) {
if (algorithm == AlgorithmMode.AES_GCM.ordinal()) {
@@ -142,11 +142,11 @@ public void clean() {
* Finalizes to encrypt or decrypt data in a single-part operation, or
finishes a
* multiple-part operation.
*
- * @param input the input byte array
- * @param inputOffset the offset in input where the input starts
- * @param inputLen the input length
- * @param output the byte array for the result
- * @param outputOffset the offset in output where the result is stored
+ * @param input The input byte array
+ * @param inputOffset The offset in input where the input starts
+ * @param inputLen The input length
+ * @param output The byte array for the result
+ * @param outputOffset The offset in output where the result is stored
* @return The number of bytes stored in output
* @throws ShortBufferException if the given output byte array is too small
* to hold the result
@@ -188,8 +188,8 @@ public int doFinal(final byte[] input, final int
inputOffset, final int inputLen
* If any exception is thrown, this cipher object need to be reset before
it
* can be used again.
*
- * @param input the input ByteBuffer
- * @param output the output ByteBuffer
+ * @param input The input ByteBuffer
+ * @param output The output ByteBuffer
* @return int number of bytes stored in {@code output}
* @throws ShortBufferException if the given output byte array is too small
* to hold the result.
@@ -218,7 +218,7 @@ protected void finalize() throws Throwable {
*
* @param mode {@link #ENCRYPT_MODE} or {@link #DECRYPT_MODE}
* @param key crypto key
- * @param params the algorithm parameters
+ * @param params The algorithm parameters
* @throws InvalidAlgorithmParameterException if IV length is wrong
*/
public void init(final int mode, final byte[] key, final
AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException {
@@ -229,11 +229,11 @@ public void init(final int mode, final byte[] key, final
AlgorithmParameterSpec
* Updates a multiple-part encryption/decryption operation. The data is
* encrypted or decrypted, depending on how this cipher was initialized.
*
- * @param input the input byte array
- * @param inputOffset the offset in input where the input starts
- * @param inputLen the input length
- * @param output the byte array for the result
- * @param outputOffset the offset in output where the result is stored
+ * @param input The input byte array
+ * @param inputOffset The offset in input where the input starts
+ * @param inputLen The input length
+ * @param output The byte array for the result
+ * @param outputOffset The offset in output where the result is stored
* @return The number of bytes stored in output
* @throws ShortBufferException if there is insufficient space in the
output
* byte array
@@ -263,8 +263,8 @@ public int update(final byte[] input, final int
inputOffset, final int inputLen,
* If {@code output.remaining()} bytes are insufficient to hold the
* result, a {@code ShortBufferException} is thrown.
*
- * @param input the input ByteBuffer
- * @param output the output ByteBuffer
+ * @param input The input ByteBuffer
+ * @param output The output ByteBuffer
* @return int number of bytes stored in {@code output}
* @throws ShortBufferException if there is insufficient space in the
output
* buffer
@@ -285,7 +285,7 @@ public int update(final ByteBuffer input, final ByteBuffer
output) throws ShortB
* {@code doFinal} methods).
* </p>
*
- * @param aad the buffer containing the Additional Authentication Data
+ * @param aad The buffer containing the Additional Authentication Data
*/
public void updateAAD(final byte[] aad) {
this.opensslBlockCipher.updateAAD(aad);
diff --git a/src/main/java/org/apache/commons/crypto/cipher/OpenSslCipher.java
b/src/main/java/org/apache/commons/crypto/cipher/OpenSslCipher.java
index 11ce5a26..6f4a93ea 100644
--- a/src/main/java/org/apache/commons/crypto/cipher/OpenSslCipher.java
+++ b/src/main/java/org/apache/commons/crypto/cipher/OpenSslCipher.java
@@ -76,11 +76,11 @@ public void close() {
* Encrypts or decrypts data in a single-part operation, or finishes a
* multiple-part operation.
*
- * @param input the input byte array
- * @param inputOffset the offset in input where the input starts
- * @param inputLen the input length
- * @param output the byte array for the result
- * @param outputOffset the offset in output where the result is stored
+ * @param input The input byte array
+ * @param inputOffset The offset in input where the input starts
+ * @param inputLen The input length
+ * @param output The byte array for the result
+ * @param outputOffset The offset in output where the result is stored
* @return The number of bytes stored in output
* @throws ShortBufferException if the given output byte array is too small
* to hold the result
@@ -105,8 +105,8 @@ public int doFinal(final byte[] input, final int
inputOffset, final int inputLen
* multiple-part operation. The data is encrypted or decrypted, depending
on
* how this openSslEngine was initialized.
*
- * @param inBuffer the input ByteBuffer
- * @param outBuffer the output ByteBuffer
+ * @param inBuffer The input ByteBuffer
+ * @param outBuffer The output ByteBuffer
* @return int number of bytes stored in {@code output}
* @throws BadPaddingException if this openSslEngine is in decryption
mode, and
* (un)padding has been requested, but the decrypted data is not
@@ -158,7 +158,7 @@ public int getBlockSize() {
*
* @param mode {@link Cipher#ENCRYPT_MODE} or {@link Cipher#DECRYPT_MODE}
* @param key crypto key for the openSslEngine
- * @param params the algorithm parameters
+ * @param params The algorithm parameters
* @throws InvalidKeyException If key length is invalid
* @throws InvalidAlgorithmParameterException if IV length is wrong
*/
@@ -177,11 +177,11 @@ public void init(final int mode, final Key key, final
AlgorithmParameterSpec par
* Continues a multiple-part encryption/decryption operation. The data is
* encrypted or decrypted, depending on how this openSslEngine was
initialized.
*
- * @param input the input byte array
- * @param inputOffset the offset in input where the input starts
- * @param inputLen the input length
- * @param output the byte array for the result
- * @param outputOffset the offset in output where the result is stored
+ * @param input The input byte array
+ * @param inputOffset The offset in input where the input starts
+ * @param inputLen The input length
+ * @param output The byte array for the result
+ * @param outputOffset The offset in output where the result is stored
* @return The number of bytes stored in output
* @throws ShortBufferException if there is insufficient space in the
output
* byte array
@@ -197,8 +197,8 @@ public int update(final byte[] input, final int
inputOffset, final int inputLen,
* Continues a multiple-part encryption/decryption operation. The data is
* encrypted or decrypted, depending on how this openSslEngine was
initialized.
*
- * @param inBuffer the input ByteBuffer
- * @param outBuffer the output ByteBuffer
+ * @param inBuffer The input ByteBuffer
+ * @param outBuffer The output ByteBuffer
* @return int number of bytes stored in {@code output}
* @throws ShortBufferException if there is insufficient space in the
output
* buffer
@@ -220,7 +220,7 @@ public int update(final ByteBuffer inBuffer, final
ByteBuffer outBuffer)
* {@code doFinal} methods).
* </p>
*
- * @param aad the buffer containing the Additional Authentication Data
+ * @param aad The buffer containing the Additional Authentication Data
* @throws IllegalArgumentException if the {@code aad}
* byte array is {@code null}
* @throws IllegalStateException if this opensslEngine is in a wrong state
@@ -258,7 +258,7 @@ public void updateAAD(final byte[] aad) throws
IllegalArgumentException,
* {@code doFinal} methods).
* </p>
*
- * @param aad the buffer containing the Additional Authentication Data
+ * @param aad The buffer containing the Additional Authentication Data
* @throws IllegalArgumentException if the {@code aad}
* byte array is {@code null}
* @throws IllegalStateException if this opensslEngine is in a wrong state
diff --git a/src/main/java/org/apache/commons/crypto/cipher/OpenSslNative.java
b/src/main/java/org/apache/commons/crypto/cipher/OpenSslNative.java
index 55d247fe..d370c945 100644
--- a/src/main/java/org/apache/commons/crypto/cipher/OpenSslNative.java
+++ b/src/main/java/org/apache/commons/crypto/cipher/OpenSslNative.java
@@ -80,7 +80,7 @@ public static native int doFinalByteArray(long context,
byte[] output,
* @param context The cipher context address
* @param mode ENCRYPT_MODE or DECRYPT_MODE
* @param alg Algorithm Mode of OpenSsl
- * @param padding the padding mode of OpenSsl cipher
+ * @param padding The padding mode of OpenSsl cipher
* @param key crypto key
* @param iv crypto iv
* @return The context address of cipher
diff --git a/src/main/java/org/apache/commons/crypto/jna/OpenSslJnaCipher.java
b/src/main/java/org/apache/commons/crypto/jna/OpenSslJnaCipher.java
index 2f50b260..7c52896f 100644
--- a/src/main/java/org/apache/commons/crypto/jna/OpenSslJnaCipher.java
+++ b/src/main/java/org/apache/commons/crypto/jna/OpenSslJnaCipher.java
@@ -59,8 +59,8 @@ private enum AlgorithmMode {
/**
* Gets the AlgorithmMode instance.
*
- * @param algorithm the algorithm name
- * @param mode the mode name
+ * @param algorithm The algorithm name
+ * @param mode The mode name
* @return The AlgorithmMode instance
* @throws NoSuchAlgorithmException if the algorithm is not support
*/
@@ -121,11 +121,11 @@ public void close() {
* Encrypts or decrypts data in a single-part operation, or finishes a
* multiple-part operation.
*
- * @param input the input byte array
- * @param inputOffset the offset in input where the input starts
- * @param inputLen the input length
- * @param output the byte array for the result
- * @param outputOffset the offset in output where the result is stored
+ * @param input The input byte array
+ * @param inputOffset The offset in input where the input starts
+ * @param inputLen The input length
+ * @param output The byte array for the result
+ * @param outputOffset The offset in output where the result is stored
* @return The number of bytes stored in output
* @throws ShortBufferException if the given output byte array is too
small
* to hold the result
@@ -154,8 +154,8 @@ public int doFinal(final byte[] input, final int
inputOffset, final int inputLen
* multiple-part operation. The data is encrypted or decrypted, depending
on how
* this cipher was initialized.
*
- * @param inBuffer the input ByteBuffer
- * @param outBuffer the output ByteBuffer
+ * @param inBuffer The input ByteBuffer
+ * @param outBuffer The output ByteBuffer
* @return int number of bytes stored in {@code output}
* @throws BadPaddingException if this cipher is in decryption mode,
and
* (un)padding has been requested, but
the
@@ -203,7 +203,7 @@ public int getBlockSize() {
*
* @param mode {@link Cipher#ENCRYPT_MODE} or {@link Cipher#DECRYPT_MODE}
* @param key crypto key for the cipher
- * @param params the algorithm parameters
+ * @param params The algorithm parameters
* @throws InvalidKeyException If key length is invalid
* @throws InvalidAlgorithmParameterException if IV length is wrong
*/
@@ -261,7 +261,7 @@ public void init(final int mode, final Key key, final
AlgorithmParameterSpec par
}
/**
- * @param retVal the result value of error.
+ * @param retVal The result value of error.
*/
private void throwOnError(final int retVal) {
if (retVal != 1) {
@@ -280,11 +280,11 @@ private void throwOnError(final int retVal) {
* Continues a multiple-part encryption/decryption operation. The data is
* encrypted or decrypted, depending on how this cipher was initialized.
*
- * @param input the input byte array
- * @param inputOffset the offset in input where the input starts
- * @param inputLen the input length
- * @param output the byte array for the result
- * @param outputOffset the offset in output where the result is stored
+ * @param input The input byte array
+ * @param inputOffset The offset in input where the input starts
+ * @param inputLen The input length
+ * @param output The byte array for the result
+ * @param outputOffset The offset in output where the result is stored
* @return The number of bytes stored in output
* @throws ShortBufferException if there is insufficient space in the
output
* byte array
@@ -301,8 +301,8 @@ public int update(final byte[] input, final int
inputOffset, final int inputLen,
* Continues a multiple-part encryption/decryption operation. The data is
* encrypted or decrypted, depending on how this cipher was initialized.
*
- * @param inBuffer the input ByteBuffer
- * @param outBuffer the output ByteBuffer
+ * @param inBuffer The input ByteBuffer
+ * @param outBuffer The output ByteBuffer
* @return int number of bytes stored in {@code output}
* @throws ShortBufferException if there is insufficient space in the
output
* buffer
@@ -326,7 +326,7 @@ public int update(final ByteBuffer inBuffer, final
ByteBuffer outBuffer) throws
* the {@code update} and {@code doFinal} methods).
* </p>
*
- * @param aad the buffer containing the Additional Authentication Data
+ * @param aad The buffer containing the Additional Authentication Data
* @throws IllegalArgumentException if the {@code aad} byte array is
{@code null}
* @throws IllegalStateException if this opensslEngine is in a
wrong
* state (e.g., has not been
initialized),
@@ -355,7 +355,7 @@ public void updateAAD(final byte[] aad)
* the {@code update} and {@code doFinal} methods).
* </p>
*
- * @param aad the buffer containing the Additional Authentication Data
+ * @param aad The buffer containing the Additional Authentication Data
* @throws IllegalArgumentException if the {@code aad} byte array is
{@code null}
* @throws IllegalStateException if this opensslEngine is in a
wrong
* state (e.g., has not been
initialized),
diff --git
a/src/main/java/org/apache/commons/crypto/jna/OpenSslJnaCryptoRandom.java
b/src/main/java/org/apache/commons/crypto/jna/OpenSslJnaCryptoRandom.java
index 4f06e594..0aeab985 100644
--- a/src/main/java/org/apache/commons/crypto/jna/OpenSslJnaCryptoRandom.java
+++ b/src/main/java/org/apache/commons/crypto/jna/OpenSslJnaCryptoRandom.java
@@ -54,7 +54,7 @@ final class OpenSslJnaCryptoRandom implements CryptoRandom {
/**
* Constructs a {@link OpenSslJnaCryptoRandom}.
*
- * @param props the configuration properties (not used)
+ * @param props The configuration properties (not used)
* @throws GeneralSecurityException if JNA access could not be enabled
*/
public OpenSslJnaCryptoRandom(final Properties props) //NOPMD
@@ -128,7 +128,7 @@ public boolean isRdrandEnabled() {
/**
* Generates a user-specified number of random bytes. It's thread-safe.
*
- * @param bytes the array to be filled in with random bytes.
+ * @param bytes The array to be filled in with random bytes.
*/
@Override
public void nextBytes(final byte[] bytes) {
@@ -151,7 +151,7 @@ public void nextBytes(final byte[] bytes) {
}
/**
- * @param retVal the result value of error.
+ * @param retVal The result value of error.
* @param closing {@code true} when called while closing.
*/
private void throwOnError(final int retVal, final boolean closing) {
diff --git a/src/main/java/org/apache/commons/crypto/random/CryptoRandom.java
b/src/main/java/org/apache/commons/crypto/random/CryptoRandom.java
index a6b2bf09..231f4472 100644
--- a/src/main/java/org/apache/commons/crypto/random/CryptoRandom.java
+++ b/src/main/java/org/apache/commons/crypto/random/CryptoRandom.java
@@ -32,7 +32,7 @@ public interface CryptoRandom extends Closeable {
* The number of random bytes produced is equal to the length of the byte
* array.
*
- * @param bytes the byte array to fill with random bytes
+ * @param bytes The byte array to fill with random bytes
*/
void nextBytes(byte[] bytes);
diff --git
a/src/main/java/org/apache/commons/crypto/random/CryptoRandomFactory.java
b/src/main/java/org/apache/commons/crypto/random/CryptoRandomFactory.java
index f7cd384a..fdac92de 100644
--- a/src/main/java/org/apache/commons/crypto/random/CryptoRandomFactory.java
+++ b/src/main/java/org/apache/commons/crypto/random/CryptoRandomFactory.java
@@ -89,7 +89,7 @@ public enum RandomProvider {
/**
* The private constructor.
*
- * @param klass the Class of CryptoRandom
+ * @param klass The Class of CryptoRandom
*/
RandomProvider(final Class<? extends CryptoRandom> klass) {
this.klass = klass;
@@ -180,7 +180,7 @@ public static CryptoRandom getCryptoRandom() throws
GeneralSecurityException {
* Failing that, it defaults to OpenSslCryptoRandom,JavaCryptoRandom
* The properties are passed to the generated class.
*
- * @param props the configuration properties.
+ * @param props The configuration properties.
* @return CryptoRandom the cryptoRandom object.
* @throws GeneralSecurityException if cannot create the {@link
CryptoRandom} class
* @throws IllegalArgumentException if no class name(s) are provided
diff --git
a/src/main/java/org/apache/commons/crypto/random/JavaCryptoRandom.java
b/src/main/java/org/apache/commons/crypto/random/JavaCryptoRandom.java
index 347e89a0..ac736bf1 100644
--- a/src/main/java/org/apache/commons/crypto/random/JavaCryptoRandom.java
+++ b/src/main/java/org/apache/commons/crypto/random/JavaCryptoRandom.java
@@ -57,7 +57,7 @@ private static SecureRandom seed(final SecureRandom
secureRandom) {
/**
* Constructs a {@link JavaCryptoRandom}.
*
- * @param properties the configuration properties. Uses the key {@link
CryptoRandomFactory#JAVA_ALGORITHM_KEY} to get the name of the algorithm, with a
+ * @param properties The configuration properties. Uses the key {@link
CryptoRandomFactory#JAVA_ALGORITHM_KEY} to get the name of the algorithm, with a
* default of {@link CryptoRandomFactory#JAVA_ALGORITHM_DEFAULT}
*/
public JavaCryptoRandom(final Properties properties) {
@@ -89,7 +89,7 @@ protected int next(final int numBits) {
* Overrides {@link CryptoRandom#nextBytes(byte[])}. Generates random
bytes and places them into a user-supplied byte array. The number of random
bytes
* produced is equal to the length of the byte array.
*
- * @param bytes the array to be filled in with random bytes.
+ * @param bytes The array to be filled in with random bytes.
*/
@Override
public void nextBytes(final byte[] bytes) {
diff --git
a/src/main/java/org/apache/commons/crypto/random/OpenSslCryptoRandom.java
b/src/main/java/org/apache/commons/crypto/random/OpenSslCryptoRandom.java
index a16f91cb..902b699d 100644
--- a/src/main/java/org/apache/commons/crypto/random/OpenSslCryptoRandom.java
+++ b/src/main/java/org/apache/commons/crypto/random/OpenSslCryptoRandom.java
@@ -82,7 +82,7 @@ public static boolean isNativeCodeEnabled() {
/**
* Constructs a {@link OpenSslCryptoRandom}.
*
- * @param props the configuration properties - not used
+ * @param props The configuration properties - not used
* @throws GeneralSecurityException if the native library could not be
initialized successfully
*/
public OpenSslCryptoRandom(final Properties props) throws
GeneralSecurityException { // NOPMD
@@ -102,7 +102,7 @@ public void close() {
* Generates a user-specified number of random bytes. It's thread-safe.
* Overrides {@link Random}.
*
- * @param bytes the array to be filled in with random bytes.
+ * @param bytes The array to be filled in with random bytes.
*/
@Override
public void nextBytes(final byte[] bytes) {
diff --git
a/src/main/java/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.java
b/src/main/java/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.java
index 094e12cd..670769fe 100644
---
a/src/main/java/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.java
+++
b/src/main/java/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.java
@@ -35,7 +35,7 @@ final class OpenSslCryptoRandomNative {
* Judges whether to use {@link OpenSslCryptoRandomNative} to generate the
* user-specified number of random bits.
*
- * @param bytes the array to be filled in with random bytes.
+ * @param bytes The array to be filled in with random bytes.
* @return {@code true} if use {@link OpenSslCryptoRandomNative} to
generate the
* user-specified number of random bits.
*/
diff --git a/src/main/java/org/apache/commons/crypto/random/OsCryptoRandom.java
b/src/main/java/org/apache/commons/crypto/random/OsCryptoRandom.java
index 11234373..f7ea6520 100644
--- a/src/main/java/org/apache/commons/crypto/random/OsCryptoRandom.java
+++ b/src/main/java/org/apache/commons/crypto/random/OsCryptoRandom.java
@@ -44,7 +44,7 @@ final class OsCryptoRandom implements CryptoRandom {
/**
* Constructs a {@link OsCryptoRandom}.
*
- * @param props the configuration properties.
+ * @param props The configuration properties.
* Uses {@link CryptoRandomFactory#DEVICE_FILE_PATH_KEY} to determine the
* path to the random device, default is
* {@link CryptoRandomFactory#DEVICE_FILE_PATH_DEFAULT}
@@ -81,7 +81,7 @@ public synchronized void close() {
/**
* Fills the reservoir.
*
- * @param min the length.
+ * @param min The length.
*/
private void fillReservoir(final int min) {
if (pos >= reservoir.length - min) {
@@ -99,7 +99,7 @@ private void fillReservoir(final int min) {
* and places them into a user-supplied byte array. The number of random
* bytes produced is equal to the length of the byte array.
*
- * @param bytes the array to be filled in with random bytes.
+ * @param bytes The array to be filled in with random bytes.
*/
@Override
public synchronized void nextBytes(final byte[] bytes) {
diff --git
a/src/main/java/org/apache/commons/crypto/stream/CryptoInputStream.java
b/src/main/java/org/apache/commons/crypto/stream/CryptoInputStream.java
index b08a6a46..8b6a98b7 100644
--- a/src/main/java/org/apache/commons/crypto/stream/CryptoInputStream.java
+++ b/src/main/java/org/apache/commons/crypto/stream/CryptoInputStream.java
@@ -73,8 +73,8 @@ public class CryptoInputStream extends InputStream implements
ReadableByteChanne
/**
* Checks and floors buffer size.
*
- * @param cipher the {@link CryptoCipher} instance.
- * @param bufferSize the buffer size.
+ * @param cipher The {@link CryptoCipher} instance.
+ * @param bufferSize The buffer size.
* @return The remaining buffer size.
*/
static int checkBufferSize(final CryptoCipher cipher, final int
bufferSize) {
@@ -86,7 +86,7 @@ static int checkBufferSize(final CryptoCipher cipher, final
int bufferSize) {
/**
* Checks whether the cipher is supported streaming.
*
- * @param cipher the {@link CryptoCipher} instance.
+ * @param cipher The {@link CryptoCipher} instance.
* @throws IOException if an I/O error occurs.
*/
static void checkStreamCipher(final CryptoCipher cipher) throws
IOException {
@@ -147,11 +147,11 @@ static int getBufferSize(final Properties props) {
/**
* Constructs a {@link CryptoInputStream}.
*
- * @param input the input data.
- * @param cipher the cipher instance.
- * @param bufferSize the bufferSize.
+ * @param input The input data.
+ * @param cipher The cipher instance.
+ * @param bufferSize The bufferSize.
* @param key crypto key for the cipher.
- * @param params the algorithm parameters.
+ * @param params The algorithm parameters.
* @throws IOException if an I/O error occurs.
*/
protected CryptoInputStream(final Input input, final CryptoCipher cipher,
final int bufferSize,
@@ -178,11 +178,11 @@ protected CryptoInputStream(final Input input, final
CryptoCipher cipher, final
/**
* Constructs a {@link CryptoInputStream}.
*
- * @param cipher the cipher instance.
- * @param inputStream the input stream.
- * @param bufferSize the bufferSize.
+ * @param cipher The cipher instance.
+ * @param inputStream The input stream.
+ * @param bufferSize The bufferSize.
* @param key crypto key for the cipher.
- * @param params the algorithm parameters.
+ * @param params The algorithm parameters.
* @throws IOException if an I/O error occurs.
*/
@SuppressWarnings("resource") // Closing the instance closes the
StreamInput
@@ -195,11 +195,11 @@ protected CryptoInputStream(final InputStream
inputStream, final CryptoCipher ci
/**
* Constructs a {@link CryptoInputStream}.
*
- * @param channel the ReadableByteChannel instance.
- * @param cipher the cipher instance.
- * @param bufferSize the bufferSize.
+ * @param channel The ReadableByteChannel instance.
+ * @param cipher The cipher instance.
+ * @param bufferSize The bufferSize.
* @param key crypto key for the cipher.
- * @param params the algorithm parameters.
+ * @param params The algorithm parameters.
* @throws IOException if an I/O error occurs.
*/
@SuppressWarnings("resource") // Closing the instance closes the
ChannelInput
@@ -212,15 +212,15 @@ protected CryptoInputStream(final ReadableByteChannel
channel, final CryptoCiphe
/**
* Constructs a {@link CryptoInputStream}.
*
- * @param transformation the name of the transformation, e.g.,
+ * @param transformation The name of the transformation, e.g.,
* <em>AES/CBC/PKCS5Padding</em>.
* See the Java Cryptography Architecture Standard Algorithm Name
Documentation
* for information about standard transformation names.
* @param properties The {@code Properties} class represents a set of
* properties.
- * @param inputStream the input stream.
+ * @param inputStream The input stream.
* @param key crypto key for the cipher.
- * @param params the algorithm parameters.
+ * @param params The algorithm parameters.
* @throws IOException if an I/O error occurs.
*/
@SuppressWarnings("resource") // The CryptoCipher returned by
getCipherInstance() is closed by CryptoInputStream.
@@ -233,15 +233,15 @@ public CryptoInputStream(final String transformation,
/**
* Constructs a {@link CryptoInputStream}.
*
- * @param transformation the name of the transformation, e.g.,
+ * @param transformation The name of the transformation, e.g.,
* <em>AES/CBC/PKCS5Padding</em>.
* See the Java Cryptography Architecture Standard Algorithm Name
Documentation
* for information about standard transformation names.
* @param properties The {@code Properties} class represents a set of
* properties.
- * @param channel the ReadableByteChannel object.
+ * @param channel The ReadableByteChannel object.
* @param key crypto key for the cipher.
- * @param params the algorithm parameters.
+ * @param params The algorithm parameters.
* @throws IOException if an I/O error occurs.
*/
@SuppressWarnings("resource") // The CryptoCipher returned by
getCipherInstance() is closed by CryptoInputStream.
@@ -489,9 +489,9 @@ public int read() throws IOException {
* read it out of this buffer. If there is no data in {@link #outBuffer},
* then read more from the underlying stream and do the decryption.
*
- * @param array the buffer into which the decrypted data is read.
- * @param off the buffer offset.
- * @param len the maximum number of decrypted data bytes to read.
+ * @param array The buffer into which the decrypted data is read.
+ * @param off The buffer offset.
+ * @param len The maximum number of decrypted data bytes to read.
* @return int the total number of decrypted data bytes read into the
* buffer.
* @throws IOException if an I/O error occurs.
@@ -574,7 +574,7 @@ public int read(final ByteBuffer dst) throws IOException {
* Overrides the {@link InputStream#skip(long)}. Skips over and
* discards {@code n} bytes of data from this input stream.
*
- * @param n the number of bytes to be skipped.
+ * @param n The number of bytes to be skipped.
* @return The actual number of bytes skipped.
* @throws IOException if an I/O error occurs.
*/
diff --git
a/src/main/java/org/apache/commons/crypto/stream/CryptoOutputStream.java
b/src/main/java/org/apache/commons/crypto/stream/CryptoOutputStream.java
index 828a4018..5c9fa1f1 100644
--- a/src/main/java/org/apache/commons/crypto/stream/CryptoOutputStream.java
+++ b/src/main/java/org/apache/commons/crypto/stream/CryptoOutputStream.java
@@ -85,11 +85,11 @@ public class CryptoOutputStream extends OutputStream
implements
/**
* Constructs a {@link CryptoOutputStream}.
*
- * @param output the output stream.
- * @param cipher the CryptoCipher instance.
- * @param bufferSize the bufferSize.
+ * @param output The output stream.
+ * @param cipher The CryptoCipher instance.
+ * @param bufferSize The bufferSize.
* @param key crypto key for the cipher.
- * @param params the algorithm parameters.
+ * @param params The algorithm parameters.
* @throws IOException if an I/O error occurs.
*/
protected CryptoOutputStream(final Output output, final CryptoCipher
cipher,
@@ -119,11 +119,11 @@ protected CryptoOutputStream(final Output output, final
CryptoCipher cipher,
/**
* Constructs a {@link CryptoOutputStream}.
*
- * @param outputStream the output stream.
- * @param cipher the CryptoCipher instance.
- * @param bufferSize the bufferSize.
+ * @param outputStream The output stream.
+ * @param cipher The CryptoCipher instance.
+ * @param bufferSize The bufferSize.
* @param key crypto key for the cipher.
- * @param params the algorithm parameters.
+ * @param params The algorithm parameters.
* @throws IOException if an I/O error occurs.
*/
@SuppressWarnings("resource") // Closing the instance closes the
StreamOutput
@@ -136,15 +136,15 @@ protected CryptoOutputStream(final OutputStream
outputStream, final CryptoCipher
/**
* Constructs a {@link CryptoOutputStream}.
*
- * @param transformation the name of the transformation, e.g.,
+ * @param transformation The name of the transformation, e.g.,
* <em>AES/CBC/PKCS5Padding</em>.
* See the Java Cryptography Architecture Standard Algorithm Name
Documentation
* for information about standard transformation names.
* @param properties The {@code Properties} class represents a set of
* properties.
- * @param outputStream the output stream.
+ * @param outputStream The output stream.
* @param key crypto key for the cipher.
- * @param params the algorithm parameters.
+ * @param params The algorithm parameters.
* @throws IOException if an I/O error occurs.
*/
@SuppressWarnings("resource") // The CryptoCipher returned by
getCipherInstance() is closed by CryptoOutputStream.
@@ -159,15 +159,15 @@ public CryptoOutputStream(final String transformation,
/**
* Constructs a {@link CryptoOutputStream}.
*
- * @param transformation the name of the transformation, e.g.,
+ * @param transformation The name of the transformation, e.g.,
* <em>AES/CBC/PKCS5Padding</em>.
* See the Java Cryptography Architecture Standard Algorithm Name
Documentation
* for information about standard transformation names.
* @param properties The {@code Properties} class represents a set of
* properties.
- * @param out the WritableByteChannel instance.
+ * @param out The WritableByteChannel instance.
* @param key crypto key for the cipher.
- * @param params the algorithm parameters.
+ * @param params The algorithm parameters.
* @throws IOException if an I/O error occurs.
*/
@SuppressWarnings("resource") // The CryptoCipher returned by
getCipherInstance() is closed by CryptoOutputStream.
@@ -182,11 +182,11 @@ public CryptoOutputStream(final String transformation,
/**
* Constructs a {@link CryptoOutputStream}.
*
- * @param channel the WritableByteChannel instance.
- * @param cipher the cipher instance.
- * @param bufferSize the bufferSize.
+ * @param channel The WritableByteChannel instance.
+ * @param cipher The cipher instance.
+ * @param bufferSize The bufferSize.
* @param key crypto key for the cipher.
- * @param params the algorithm parameters.
+ * @param params The algorithm parameters.
* @throws IOException if an I/O error occurs.
*/
@SuppressWarnings("resource") // Closing the instance closes the
ChannelOutput
@@ -367,9 +367,9 @@ public boolean isOpen() {
* then write to this buffer. If {@link #inBuffer} is full, then do
* encryption and write data to the underlying stream.
*
- * @param array the data.
- * @param off the start offset in the data.
- * @param len the number of bytes to write.
+ * @param array The data.
+ * @param off The start offset in the data.
+ * @param len The number of bytes to write.
* @throws IOException if an I/O error occurs.
*/
@Override
@@ -437,7 +437,7 @@ public int write(final ByteBuffer src) throws IOException {
* Overrides the {@link OutputStream#write(byte[])}. Writes the
* specified byte to this output stream.
*
- * @param b the data.
+ * @param b The data.
* @throws IOException if an I/O error occurs.
*/
@Override
diff --git
a/src/main/java/org/apache/commons/crypto/stream/CtrCryptoInputStream.java
b/src/main/java/org/apache/commons/crypto/stream/CtrCryptoInputStream.java
index 60378f03..86fcc97c 100644
--- a/src/main/java/org/apache/commons/crypto/stream/CtrCryptoInputStream.java
+++ b/src/main/java/org/apache/commons/crypto/stream/CtrCryptoInputStream.java
@@ -72,7 +72,7 @@ public class CtrCryptoInputStream extends CryptoInputStream {
*
* @param initIV initial IV
* @param counter counter for input stream position
- * @param IV the IV for input stream position
+ * @param IV The IV for input stream position
*/
static void calculateIV(final byte[] initIV, long counter, final byte[]
IV) {
int i = IV.length; // IV length
@@ -123,9 +123,9 @@ static void calculateIV(final byte[] initIV, long counter,
final byte[] IV) {
/**
* Constructs a {@link CtrCryptoInputStream}.
*
- * @param input the input data.
- * @param cipher the CryptoCipher instance.
- * @param bufferSize the bufferSize.
+ * @param input The input data.
+ * @param cipher The CryptoCipher instance.
+ * @param bufferSize The bufferSize.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
* @throws IOException if an I/O error occurs.
@@ -138,12 +138,12 @@ protected CtrCryptoInputStream(final Input input, final
CryptoCipher cipher,
/**
* Constructs a {@link CtrCryptoInputStream}.
*
- * @param input the input data.
- * @param cipher the CryptoCipher instance.
- * @param bufferSize the bufferSize.
+ * @param input The input data.
+ * @param cipher The CryptoCipher instance.
+ * @param bufferSize The bufferSize.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
- * @param streamOffset the start offset in the stream.
+ * @param streamOffset The start offset in the stream.
* @throws IOException if an I/O error occurs.
*/
protected CtrCryptoInputStream(final Input input, final CryptoCipher
cipher,
@@ -163,9 +163,9 @@ protected CtrCryptoInputStream(final Input input, final
CryptoCipher cipher,
/**
* Constructs a {@link CtrCryptoInputStream}.
*
- * @param inputStream the input stream.
- * @param cipher the CryptoCipher instance.
- * @param bufferSize the bufferSize.
+ * @param inputStream The input stream.
+ * @param cipher The CryptoCipher instance.
+ * @param bufferSize The bufferSize.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
* @throws IOException if an I/O error occurs.
@@ -178,12 +178,12 @@ protected CtrCryptoInputStream(final InputStream
inputStream, final CryptoCipher
/**
* Constructs a {@link CtrCryptoInputStream}.
*
- * @param inputStream the InputStream instance.
- * @param cipher the CryptoCipher instance.
- * @param bufferSize the bufferSize.
+ * @param inputStream The InputStream instance.
+ * @param cipher The CryptoCipher instance.
+ * @param bufferSize The bufferSize.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
- * @param streamOffset the start offset in the stream.
+ * @param streamOffset The start offset in the stream.
* @throws IOException if an I/O error occurs.
*/
@SuppressWarnings("resource") // Closing the instance closes the
StreamInput
@@ -199,7 +199,7 @@ protected CtrCryptoInputStream(final InputStream
inputStream, final CryptoCipher
*
* @param properties The {@code Properties} class represents a set of
* properties.
- * @param inputStream the input stream.
+ * @param inputStream The input stream.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
* @throws IOException if an I/O error occurs.
@@ -214,10 +214,10 @@ public CtrCryptoInputStream(final Properties properties,
final InputStream input
*
* @param properties The {@code Properties} class represents a set of
* properties.
- * @param inputStream the InputStream instance.
+ * @param inputStream The InputStream instance.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
- * @param streamOffset the start offset in the stream.
+ * @param streamOffset The start offset in the stream.
* @throws IOException if an I/O error occurs.
*/
@SuppressWarnings("resource") // The CryptoCipher returned by
getCipherInstance() is closed by CtrCryptoInputStream.
@@ -233,7 +233,7 @@ public CtrCryptoInputStream(final Properties properties,
final InputStream input
*
* @param properties The {@code Properties} class represents a set of
* properties.
- * @param channel the ReadableByteChannel instance.
+ * @param channel The ReadableByteChannel instance.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
* @throws IOException if an I/O error occurs.
@@ -248,10 +248,10 @@ public CtrCryptoInputStream(final Properties properties,
final ReadableByteChann
*
* @param properties The {@code Properties} class represents a set of
* properties.
- * @param in the ReadableByteChannel instance.
+ * @param in The ReadableByteChannel instance.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
- * @param streamOffset the start offset in the stream.
+ * @param streamOffset The start offset in the stream.
* @throws IOException if an I/O error occurs.
*/
@SuppressWarnings("resource") // The CryptoCipher returned by
getCipherInstance() is closed by CtrCryptoInputStream.
@@ -265,9 +265,9 @@ public CtrCryptoInputStream(final Properties properties,
final ReadableByteChann
/**
* Constructs a {@link CtrCryptoInputStream}.
*
- * @param channel the ReadableByteChannel instance.
- * @param cipher the cipher instance.
- * @param bufferSize the bufferSize.
+ * @param channel The ReadableByteChannel instance.
+ * @param cipher The cipher instance.
+ * @param bufferSize The bufferSize.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
* @throws IOException if an I/O error occurs.
@@ -280,12 +280,12 @@ protected CtrCryptoInputStream(final ReadableByteChannel
channel, final CryptoCi
/**
* Constructs a {@link CtrCryptoInputStream}.
*
- * @param channel the ReadableByteChannel instance.
- * @param cipher the CryptoCipher instance.
- * @param bufferSize the bufferSize.
+ * @param channel The ReadableByteChannel instance.
+ * @param cipher The CryptoCipher instance.
+ * @param bufferSize The bufferSize.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
- * @param streamOffset the start offset in the stream.
+ * @param streamOffset The start offset in the stream.
* @throws IOException if an I/O error occurs.
*/
@SuppressWarnings("resource") // Closing the instance closes the
ChannelInput
@@ -331,8 +331,8 @@ protected void decrypt() throws IOException {
* should be unchanged after decryption.
*
* @param buf The buffer into which bytes are to be transferred.
- * @param offset the start offset in the data.
- * @param len the maximum number of decrypted data bytes to read.
+ * @param offset The start offset in the data.
+ * @param len The maximum number of decrypted data bytes to read.
* @throws IOException if an I/O error occurs.
*/
protected void decrypt(final ByteBuffer buf, final int offset, final int
len)
@@ -361,7 +361,7 @@ protected void decrypt(final ByteBuffer buf, final int
offset, final int len)
/**
* Does the decryption using out as output.
*
- * @param out the output ByteBuffer.
+ * @param out The output ByteBuffer.
* @throws IOException if an I/O error occurs.
*/
protected void decryptBuffer(final ByteBuffer out) throws IOException {
@@ -430,7 +430,7 @@ protected int decryptMore() throws IOException {
/**
* Gets the counter for input stream position.
*
- * @param position the given position in the data.
+ * @param position The given position in the data.
* @return The counter for input stream position.
*/
protected long getCounter(final long position) {
@@ -449,7 +449,7 @@ protected byte[] getInitIV() {
/**
* Gets the padding for input stream position.
*
- * @param position the given position in the data.
+ * @param position The given position in the data.
* @return The padding for input stream position.
*/
protected byte getPadding(final long position) {
@@ -488,7 +488,7 @@ protected void initCipher() {
* This method is executed immediately after decryption. Checks whether
* cipher should be updated and recalculate padding if needed.
*
- * @param position the given position in the data.
+ * @param position The given position in the data.
* @return The byte.
* @throws IOException if an I/O error occurs.
*/
@@ -557,7 +557,7 @@ public int read(final ByteBuffer buf) throws IOException {
/**
* Calculates the counter and iv, resets the cipher.
*
- * @param position the given position in the data.
+ * @param position The given position in the data.
* @throws IOException if an I/O error occurs.
*/
protected void resetCipher(final long position) throws IOException {
@@ -575,7 +575,7 @@ protected void resetCipher(final long position) throws
IOException {
* Resets the underlying stream offset; clear {@link #inBuffer} and
* {@link #outBuffer}. This Typically happens during {@link #skip(long)}.
*
- * @param offset the offset of the stream.
+ * @param offset The offset of the stream.
* @throws IOException if an I/O error occurs.
*/
protected void resetStreamOffset(final long offset) throws IOException {
@@ -592,7 +592,7 @@ protected void resetStreamOffset(final long offset) throws
IOException {
* Seeks the stream to a specific position relative to start of the under
* layer stream.
*
- * @param position the given position in the data.
+ * @param position The given position in the data.
* @throws IOException if an I/O error occurs.
*/
public void seek(final long position) throws IOException {
@@ -616,7 +616,7 @@ public void seek(final long position) throws IOException {
/**
* Sets the offset of stream.
*
- * @param streamOffset the stream offset.
+ * @param streamOffset The stream offset.
*/
protected void setStreamOffset(final long streamOffset) {
this.streamOffset = streamOffset;
@@ -626,7 +626,7 @@ protected void setStreamOffset(final long streamOffset) {
* Overrides the {@link CryptoInputStream#skip(long)}. Skips over and
* discards {@code n} bytes of data from this input stream.
*
- * @param n the number of bytes to be skipped.
+ * @param n The number of bytes to be skipped.
* @return The actual number of bytes skipped.
* @throws IOException if an I/O error occurs.
*/
diff --git
a/src/main/java/org/apache/commons/crypto/stream/CtrCryptoOutputStream.java
b/src/main/java/org/apache/commons/crypto/stream/CtrCryptoOutputStream.java
index 8de39472..baa1e79b 100644
--- a/src/main/java/org/apache/commons/crypto/stream/CtrCryptoOutputStream.java
+++ b/src/main/java/org/apache/commons/crypto/stream/CtrCryptoOutputStream.java
@@ -85,9 +85,9 @@ public class CtrCryptoOutputStream extends CryptoOutputStream
{
/**
* Constructs a {@link CtrCryptoOutputStream}.
*
- * @param output the Output instance.
- * @param cipher the CryptoCipher instance.
- * @param bufferSize the bufferSize.
+ * @param output The Output instance.
+ * @param cipher The CryptoCipher instance.
+ * @param bufferSize The bufferSize.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
* @throws IOException if an I/O error occurs.
@@ -100,12 +100,12 @@ protected CtrCryptoOutputStream(final Output output,
final CryptoCipher cipher,
/**
* Constructs a {@link CtrCryptoOutputStream}.
*
- * @param output the output stream.
- * @param cipher the CryptoCipher instance.
- * @param bufferSize the bufferSize.
+ * @param output The output stream.
+ * @param cipher The CryptoCipher instance.
+ * @param bufferSize The bufferSize.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
- * @param streamOffset the start offset in the data.
+ * @param streamOffset The start offset in the data.
* @throws IOException if an I/O error occurs.
*/
protected CtrCryptoOutputStream(final Output output, final CryptoCipher
cipher,
@@ -125,9 +125,9 @@ protected CtrCryptoOutputStream(final Output output, final
CryptoCipher cipher,
/**
* Constructs a {@link CtrCryptoOutputStream}.
*
- * @param out the output stream.
- * @param cipher the CryptoCipher instance.
- * @param bufferSize the bufferSize.
+ * @param out The output stream.
+ * @param cipher The CryptoCipher instance.
+ * @param bufferSize The bufferSize.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
* @throws IOException if an I/O error occurs.
@@ -140,12 +140,12 @@ protected CtrCryptoOutputStream(final OutputStream out,
final CryptoCipher ciphe
/**
* Constructs a {@link CtrCryptoOutputStream}.
*
- * @param outputStream the output stream.
- * @param cipher the CryptoCipher instance.
- * @param bufferSize the bufferSize.
+ * @param outputStream The output stream.
+ * @param cipher The CryptoCipher instance.
+ * @param bufferSize The bufferSize.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
- * @param streamOffset the start offset in the data.
+ * @param streamOffset The start offset in the data.
* @throws IOException if an I/O error occurs.
*/
@SuppressWarnings("resource") // Closing the instance closes the
StreamOutput
@@ -160,7 +160,7 @@ protected CtrCryptoOutputStream(final OutputStream
outputStream, final CryptoCip
*
* @param props The {@code Properties} class represents a set of
* properties.
- * @param out the output stream.
+ * @param out The output stream.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
* @throws IOException if an I/O error occurs.
@@ -175,10 +175,10 @@ public CtrCryptoOutputStream(final Properties props,
final OutputStream out,
*
* @param properties The {@code Properties} class represents a set of
* properties.
- * @param outputStream the output stream.
+ * @param outputStream The output stream.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
- * @param streamOffset the start offset in the data.
+ * @param streamOffset The start offset in the data.
* @throws IOException if an I/O error occurs.
*/
@SuppressWarnings("resource") // The CryptoCipher returned by
getCipherInstance() is closed by CtrCryptoOutputStream.
@@ -194,7 +194,7 @@ public CtrCryptoOutputStream(final Properties properties,
final OutputStream out
*
* @param props The {@code Properties} class represents a set of
* properties.
- * @param out the WritableByteChannel instance.
+ * @param out The WritableByteChannel instance.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
* @throws IOException if an I/O error occurs.
@@ -209,10 +209,10 @@ public CtrCryptoOutputStream(final Properties props,
final WritableByteChannel o
*
* @param properties The {@code Properties} class represents a set of
* properties.
- * @param channel the WritableByteChannel instance.
+ * @param channel The WritableByteChannel instance.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
- * @param streamOffset the start offset in the data.
+ * @param streamOffset The start offset in the data.
* @throws IOException if an I/O error occurs.
*/
@SuppressWarnings("resource") // The CryptoCipher returned by
getCipherInstance() is closed by CtrCryptoOutputStream.
@@ -226,9 +226,9 @@ public CtrCryptoOutputStream(final Properties properties,
final WritableByteChan
/**
* Constructs a {@link CtrCryptoOutputStream}.
*
- * @param channel the WritableByteChannel instance.
- * @param cipher the CryptoCipher instance.
- * @param bufferSize the bufferSize.
+ * @param channel The WritableByteChannel instance.
+ * @param cipher The CryptoCipher instance.
+ * @param bufferSize The bufferSize.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
* @throws IOException if an I/O error occurs.
@@ -242,12 +242,12 @@ protected CtrCryptoOutputStream(final WritableByteChannel
channel,
/**
* Constructs a {@link CtrCryptoOutputStream}.
*
- * @param channel the WritableByteChannel instance.
- * @param cipher the CryptoCipher instance.
- * @param bufferSize the bufferSize.
+ * @param channel The WritableByteChannel instance.
+ * @param cipher The CryptoCipher instance.
+ * @param bufferSize The bufferSize.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
- * @param streamOffset the start offset in the data.
+ * @param streamOffset The start offset in the data.
* @throws IOException if an I/O error occurs.
*/
@SuppressWarnings("resource") // Closing the instance closes the
ChannelOutput
@@ -302,7 +302,7 @@ protected void encrypt() throws IOException {
/**
* Does the encryption if the ByteBuffer data.
*
- * @param out the output ByteBuffer.
+ * @param out The output ByteBuffer.
* @throws IOException if an I/O error occurs.
*/
private void encryptBuffer(final ByteBuffer out) throws IOException {
@@ -376,7 +376,7 @@ private void resetCipher() throws IOException {
/**
* Sets the underlying stream offset
*
- * @param streamOffset the underlying stream offset
+ * @param streamOffset The underlying stream offset
*/
protected void setStreamOffset(final long streamOffset) {
this.streamOffset = streamOffset;
diff --git
a/src/main/java/org/apache/commons/crypto/stream/PositionedCryptoInputStream.java
b/src/main/java/org/apache/commons/crypto/stream/PositionedCryptoInputStream.java
index 0aa96aed..314bd94b 100644
---
a/src/main/java/org/apache/commons/crypto/stream/PositionedCryptoInputStream.java
+++
b/src/main/java/org/apache/commons/crypto/stream/PositionedCryptoInputStream.java
@@ -49,7 +49,7 @@ private static final class CipherState {
/**
* Constructs a new instance.
*
- * @param cryptoCipher the CryptoCipher instance.
+ * @param cryptoCipher The CryptoCipher instance.
*/
public CipherState(final CryptoCipher cryptoCipher) {
this.cryptoCipher = cryptoCipher;
@@ -77,7 +77,7 @@ public boolean isReset() {
/**
* Sets the value of reset.
*
- * @param reset the reset.
+ * @param reset The reset.
*/
public void reset(final boolean reset) {
this.reset = reset;
@@ -104,10 +104,10 @@ public void reset(final boolean reset) {
*
* @param properties The {@code Properties} class represents a set of
* properties.
- * @param in the input data.
+ * @param in The input data.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
- * @param streamOffset the start offset in the data.
+ * @param streamOffset The start offset in the data.
* @throws IOException if an I/O error occurs.
*/
@SuppressWarnings("resource") // The CryptoCipher returned by
getCipherInstance() is closed by PositionedCryptoInputStream.
@@ -119,13 +119,13 @@ public PositionedCryptoInputStream(final Properties
properties, final Input in,
/**
* Constructs a {@link PositionedCryptoInputStream}.
*
- * @param properties the properties of stream
- * @param input the input data.
- * @param cipher the CryptoCipher instance.
- * @param bufferSize the bufferSize.
+ * @param properties The properties of stream
+ * @param input The input data.
+ * @param cipher The CryptoCipher instance.
+ * @param bufferSize The bufferSize.
* @param key crypto key for the cipher.
* @param iv Initialization vector for the cipher.
- * @param streamOffset the start offset in the data.
+ * @param streamOffset The start offset in the data.
* @throws IOException if an I/O error occurs.
*/
protected PositionedCryptoInputStream(final Properties properties, final
Input input, final CryptoCipher cipher,
@@ -173,10 +173,10 @@ public void close() throws IOException {
* return, inBuffer is cleared; the decrypted data starts at
* outBuffer.position() and ends at outBuffer.limit().
*
- * @param state the CipherState instance.
- * @param inByteBuffer the input buffer.
- * @param outByteBuffer the output buffer.
- * @param padding the padding.
+ * @param state The CipherState instance.
+ * @param inByteBuffer The input buffer.
+ * @param outByteBuffer The output buffer.
+ * @param padding The padding.
* @throws IOException if an I/O error occurs.
*/
private void decrypt(final CipherState state, final ByteBuffer
inByteBuffer,
@@ -204,10 +204,10 @@ private void decrypt(final CipherState state, final
ByteBuffer inByteBuffer,
* Decrypts length bytes in buffer starting at offset. Output is also put
* into buffer starting at offset. It is thread-safe.
*
- * @param buffer the buffer into which the data is read.
- * @param offset the start offset in the data.
- * @param position the offset from the start of the stream.
- * @param length the maximum number of bytes to read.
+ * @param buffer The buffer into which the data is read.
+ * @param offset The start offset in the data.
+ * @param position The offset from the start of the stream.
+ * @param length The maximum number of bytes to read.
* @throws IOException if an I/O error occurs.
*/
protected void decrypt(final long position, final byte[] buffer, final int
offset, final int length)
@@ -244,9 +244,9 @@ protected void decrypt(final long position, final byte[]
buffer, final int offse
/**
* Does the decryption using inBuffer as input and outBuffer as output.
*
- * @param state the CipherState instance.
- * @param inByteBuffer the input buffer.
- * @param outByteBuffer the output buffer.
+ * @param state The CipherState instance.
+ * @param inByteBuffer The input buffer.
+ * @param outByteBuffer The output buffer.
* @throws IOException if an I/O error occurs.
*/
@SuppressWarnings("resource") // getCryptoCipher does not allocate
@@ -296,10 +296,10 @@ private CipherState getCipherState() throws IOException {
* This method is executed immediately after decryption. Check whether
* cipher should be updated and recalculate padding if needed.
*
- * @param state the CipherState instance.
- * @param inByteBuffer the input buffer.
- * @param position the offset from the start of the stream.
- * @param iv the iv.
+ * @param state The CipherState instance.
+ * @param inByteBuffer The input buffer.
+ * @param position The offset from the start of the stream.
+ * @param iv The iv.
* @return The padding.
*/
private byte postDecryption(final CipherState state, final ByteBuffer
inByteBuffer,
@@ -324,10 +324,10 @@ private byte postDecryption(final CipherState state,
final ByteBuffer inByteBuff
* stream and return the number of bytes read. This does not change the
* current offset of the stream, and is thread-safe.
*
- * @param buffer the buffer into which the data is read.
- * @param length the maximum number of bytes to read.
- * @param offset the start offset in the data.
- * @param position the offset from the start of the stream.
+ * @param buffer The buffer into which the data is read.
+ * @param length The maximum number of bytes to read.
+ * @param offset The start offset in the data.
+ * @param position The offset from the start of the stream.
* @throws IOException if an I/O error occurs.
* @return int the total number of decrypted data bytes read into the
* buffer.
@@ -348,8 +348,8 @@ public int read(final long position, final byte[] buffer,
final int offset, fina
* stream. This does not change the current offset of the stream and is
* thread-safe.
*
- * @param position the offset from the start of the stream.
- * @param buffer the buffer into which the data is read.
+ * @param position The offset from the start of the stream.
+ * @param buffer The buffer into which the data is read.
* @throws IOException if an I/O error occurs.
*/
public void readFully(final long position, final byte[] buffer) throws
IOException {
@@ -361,10 +361,10 @@ public void readFully(final long position, final byte[]
buffer) throws IOExcepti
* stream. This does not change the current offset of the stream and is
* thread-safe.
*
- * @param buffer the buffer into which the data is read.
- * @param length the maximum number of bytes to read.
- * @param offset the start offset in the data.
- * @param position the offset from the start of the stream.
+ * @param buffer The buffer into which the data is read.
+ * @param length The maximum number of bytes to read.
+ * @param offset The start offset in the data.
+ * @param position The offset from the start of the stream.
* @throws IOException if an I/O error occurs.
*/
public void readFully(final long position, final byte[] buffer, final int
offset, final int length)
@@ -380,9 +380,9 @@ public void readFully(final long position, final byte[]
buffer, final int offset
/**
* Calculates the counter and iv, reset the cipher.
*
- * @param state the CipherState instance.
- * @param position the offset from the start of the stream.
- * @param iv the iv.
+ * @param state The CipherState instance.
+ * @param position The offset from the start of the stream.
+ * @param iv The iv.
*/
@SuppressWarnings("resource") // getCryptoCipher does not allocate
private void resetCipher(final CipherState state, final long position,
final byte[] iv) {
@@ -399,7 +399,7 @@ private void resetCipher(final CipherState state, final
long position, final byt
/**
* Returns direct buffer to pool.
*
- * @param buf the buffer.
+ * @param buf The buffer.
*/
private void returnToPool(final ByteBuffer buf) {
if (buf != null) {
@@ -411,7 +411,7 @@ private void returnToPool(final ByteBuffer buf) {
/**
* Returns CryptoCipher to pool.
*
- * @param state the CipherState instance.
+ * @param state The CipherState instance.
*/
private void returnToPool(final CipherState state) {
if (state != null) {
diff --git
a/src/main/java/org/apache/commons/crypto/stream/input/ChannelInput.java
b/src/main/java/org/apache/commons/crypto/stream/input/ChannelInput.java
index 8d114ea2..75495a7d 100644
--- a/src/main/java/org/apache/commons/crypto/stream/input/ChannelInput.java
+++ b/src/main/java/org/apache/commons/crypto/stream/input/ChannelInput.java
@@ -39,7 +39,7 @@ public class ChannelInput implements Input {
* Constructs the
* {@link org.apache.commons.crypto.stream.input.ChannelInput}.
*
- * @param channel the ReadableByteChannel object.
+ * @param channel The ReadableByteChannel object.
* @throws NullPointerException if channel is null.
*/
public ChannelInput(final ReadableByteChannel channel) {
@@ -113,10 +113,10 @@ public int read(final ByteBuffer dst) throws IOException {
* bytes, but a smaller number may be read. The number of bytes actually
* read is returned as an integer.
*
- * @param position the given position within a stream.
- * @param buffer the buffer into which the data is read.
- * @param offset the start offset in array buffer.
- * @param length the maximum number of bytes to read.
+ * @param position The given position within a stream.
+ * @param buffer The buffer into which the data is read.
+ * @param offset The start offset in array buffer.
+ * @param length The maximum number of bytes to read.
* @return The total number of bytes read into the buffer, or
* {@code -1} if there is no more data because the end of the
* stream has been reached.
@@ -135,7 +135,7 @@ public int read(final long position, final byte[] buffer,
final int offset, fina
* the given offset from the start of the stream. The next read() will be
* from that location.
*
- * @param position the offset from the start of the stream.
+ * @param position The offset from the start of the stream.
* @throws IOException if an I/O error occurs.
*/
@Override
@@ -149,7 +149,7 @@ public void seek(final long position) throws IOException {
* {@link org.apache.commons.crypto.stream.input.Input#skip(long)}. Skips
* over and discards {@code n} bytes of data from this input stream.
*
- * @param n the number of bytes to be skipped.
+ * @param n The number of bytes to be skipped.
* @return The actual number of bytes skipped.
* @throws IOException if an I/O error occurs.
*/
diff --git a/src/main/java/org/apache/commons/crypto/stream/input/Input.java
b/src/main/java/org/apache/commons/crypto/stream/input/Input.java
index 9dd1fec9..22c09fda 100644
--- a/src/main/java/org/apache/commons/crypto/stream/input/Input.java
+++ b/src/main/java/org/apache/commons/crypto/stream/input/Input.java
@@ -95,10 +95,10 @@ public interface Input extends Closeable {
* An implementation may not support positioned read. If the implementation
* doesn't support positioned read, it throws
UnsupportedOperationException.
*
- * @param position the given position within a stream.
- * @param buffer the buffer into which the data is read.
- * @param offset the start offset in array buffer.
- * @param length the maximum number of bytes to read.
+ * @param position The given position within a stream.
+ * @param buffer The buffer into which the data is read.
+ * @param offset The start offset in array buffer.
+ * @param length The maximum number of bytes to read.
* @return The total number of bytes read into the buffer, or
* {@code -1} if there is no more data because the end of the
* stream has been reached.
@@ -114,7 +114,7 @@ int read(long position, byte[] buffer, int offset, int
length)
* An implementation may not support seek. If the implementation doesn't
* support seek, it throws UnsupportedOperationException.
*
- * @param position the offset from the start of the stream.
+ * @param position The offset from the start of the stream.
* @throws IOException if an I/O error occurs.
*/
void seek(long position) throws IOException;
@@ -135,7 +135,7 @@ int read(long position, byte[] buffer, int offset, int
length)
* a more efficient implementation of this method. For instance, the
* implementation may depend on the ability to seek.
*
- * @param n the number of bytes to be skipped.
+ * @param n The number of bytes to be skipped.
* @return The actual number of bytes skipped.
* @throws IOException if the stream does not support seek, or if some
* other I/O error occurs.
diff --git
a/src/main/java/org/apache/commons/crypto/stream/input/StreamInput.java
b/src/main/java/org/apache/commons/crypto/stream/input/StreamInput.java
index 0cd7f6d7..17401a29 100644
--- a/src/main/java/org/apache/commons/crypto/stream/input/StreamInput.java
+++ b/src/main/java/org/apache/commons/crypto/stream/input/StreamInput.java
@@ -39,8 +39,8 @@ public class StreamInput implements Input {
/**
* Constructs a {@link org.apache.commons.crypto.stream.input.StreamInput}.
*
- * @param inputStream the InputStream object.
- * @param bufferSize the buffer size.
+ * @param inputStream The InputStream object.
+ * @param bufferSize The buffer size.
* @throws NullPointerException if inputStream is null.
*/
public StreamInput(final InputStream inputStream, final int bufferSize) {
@@ -120,10 +120,10 @@ public int read(final ByteBuffer dst) throws IOException {
* bytes, but a smaller number may be read. The number of bytes actually
* read is returned as an integer.
*
- * @param position the given position within a stream.
- * @param buffer the buffer into which the data is read.
- * @param offset the start offset in array buffer.
- * @param length the maximum number of bytes to read.
+ * @param position The given position within a stream.
+ * @param buffer The buffer into which the data is read.
+ * @param offset The start offset in array buffer.
+ * @param length The maximum number of bytes to read.
* @return The total number of bytes read into the buffer, or
* {@code EOS (-1)} if there is no more data because the end of the
* stream has been reached.
@@ -140,7 +140,7 @@ public int read(final long position, final byte[] buffer,
final int offset, fina
* the given offset from the start of the stream. The next read() will be
* from that location.
*
- * @param position the offset from the start of the stream.
+ * @param position The offset from the start of the stream.
* @throws IOException if an I/O error occurs.
*/
@Override
@@ -153,7 +153,7 @@ public void seek(final long position) throws IOException {
* {@link org.apache.commons.crypto.stream.input.Input#skip(long)}. Skips
* over and discards {@code n} bytes of data from this input stream.
*
- * @param n the number of bytes to be skipped.
+ * @param n The number of bytes to be skipped.
* @return The actual number of bytes skipped.
* @throws IOException if an I/O error occurs.
*/
diff --git
a/src/main/java/org/apache/commons/crypto/stream/output/ChannelOutput.java
b/src/main/java/org/apache/commons/crypto/stream/output/ChannelOutput.java
index 1b5d6191..c3436852 100644
--- a/src/main/java/org/apache/commons/crypto/stream/output/ChannelOutput.java
+++ b/src/main/java/org/apache/commons/crypto/stream/output/ChannelOutput.java
@@ -37,7 +37,7 @@ public class ChannelOutput implements Output {
* Constructs a
* {@link org.apache.commons.crypto.stream.output.ChannelOutput}.
*
- * @param channel the WritableByteChannel object.
+ * @param channel The WritableByteChannel object.
* @throws NullPointerException if channel is null.
*/
public ChannelOutput(final WritableByteChannel channel) {
diff --git
a/src/main/java/org/apache/commons/crypto/stream/output/StreamOutput.java
b/src/main/java/org/apache/commons/crypto/stream/output/StreamOutput.java
index f7c47388..13fe8174 100644
--- a/src/main/java/org/apache/commons/crypto/stream/output/StreamOutput.java
+++ b/src/main/java/org/apache/commons/crypto/stream/output/StreamOutput.java
@@ -37,8 +37,8 @@ public class StreamOutput implements Output {
/**
* Constructs a new instance.
*
- * @param out the OutputStream object.
- * @param bufferSize the buffer size.
+ * @param out The OutputStream object.
+ * @param bufferSize The buffer size.
* @throws NullPointerException if channel is null.
*/
public StreamOutput(final OutputStream out, final int bufferSize) {
diff --git a/src/main/java/org/apache/commons/crypto/utils/AES.java
b/src/main/java/org/apache/commons/crypto/utils/AES.java
index 959148ea..617139b7 100644
--- a/src/main/java/org/apache/commons/crypto/utils/AES.java
+++ b/src/main/java/org/apache/commons/crypto/utils/AES.java
@@ -52,7 +52,7 @@ public class AES {
/**
* Creates a new SecretKeySpec for the given key and {@link #ALGORITHM}.
*
- * @param key a key.
+ * @param key A key.
* @return A new SecretKeySpec.
*/
public static SecretKeySpec newSecretKeySpec(final byte[] key) {
diff --git a/src/main/java/org/apache/commons/crypto/utils/IoUtils.java
b/src/main/java/org/apache/commons/crypto/utils/IoUtils.java
index b28cfa83..270ccbc4 100644
--- a/src/main/java/org/apache/commons/crypto/utils/IoUtils.java
+++ b/src/main/java/org/apache/commons/crypto/utils/IoUtils.java
@@ -33,7 +33,7 @@ public final class IoUtils {
* Closes the Closeable objects and <strong>ignore</strong> any {@link
IOException} or
* null pointers. Must only be used for cleanup in exception handlers.
*
- * @param closeables the objects to close.
+ * @param closeables The objects to close.
*/
public static void cleanup(final Closeable... closeables) {
if (closeables != null) {
@@ -57,11 +57,11 @@ public static void closeQuietly(final Closeable closeable) {
* Does the readFully based on Input's positioned read. This does not
change
* the current offset of the stream and is thread-safe.
*
- * @param in the input source.
- * @param position the given position.
- * @param buffer the buffer to be read.
- * @param length the maximum number of bytes to read.
- * @param offset the start offset in array buffer.
+ * @param in The input source.
+ * @param position The given position.
+ * @param buffer The buffer to be read.
+ * @param length The maximum number of bytes to read.
+ * @param offset The start offset in array buffer.
* @throws IOException if an I/O error occurs.
*/
public static void readFully(final Input in, final long position, final
byte[] buffer,
@@ -81,10 +81,10 @@ public static void readFully(final Input in, final long
position, final byte[] b
/**
* Does the readFully based on the Input read.
*
- * @param in the input stream of bytes.
- * @param buf the buffer to be read.
- * @param off the start offset in array buffer.
- * @param len the maximum number of bytes to read.
+ * @param in The input stream of bytes.
+ * @param buf The buffer to be read.
+ * @param off The start offset in array buffer.
+ * @param len The maximum number of bytes to read.
* @throws IOException if an I/O error occurs.
*/
public static void readFully(final InputStream in, final byte[] buf, int
off, final int len)
diff --git a/src/main/java/org/apache/commons/crypto/utils/Padding.java
b/src/main/java/org/apache/commons/crypto/utils/Padding.java
index be2a92d5..f85f5904 100644
--- a/src/main/java/org/apache/commons/crypto/utils/Padding.java
+++ b/src/main/java/org/apache/commons/crypto/utils/Padding.java
@@ -34,7 +34,7 @@ public enum Padding {
/**
* Gets a Padding.
*
- * @param padding the padding name.
+ * @param padding The padding name.
* @return A Padding instance.
* @throws NoSuchPaddingException if the algorithm is not supported.
*/
diff --git a/src/main/java/org/apache/commons/crypto/utils/ReflectionUtils.java
b/src/main/java/org/apache/commons/crypto/utils/ReflectionUtils.java
index abf7221b..c1942f9b 100644
--- a/src/main/java/org/apache/commons/crypto/utils/ReflectionUtils.java
+++ b/src/main/java/org/apache/commons/crypto/utils/ReflectionUtils.java
@@ -61,7 +61,7 @@ private abstract static class AbstractNegativeCacheSentinel {
/**
* Loads a class by name.
*
- * @param name the class name.
+ * @param name The class name.
* @return The class object.
* @throws ClassNotFoundException if the class is not found.
*/
@@ -80,7 +80,7 @@ public static Class<?> getClassByName(final String name)
throws ClassNotFoundExc
* Loads a class by name, returning {@code null} rather than throwing an
exception if it
* couldn't be loaded. This is to avoid the overhead of creating an
exception.
*
- * @param name the class name.
+ * @param name The class name.
* @return The class object, or {@code null} if it could not be found or
initialization failed.
*/
private static Class<?> getClassByNameOrNull(final String name) {
@@ -131,7 +131,7 @@ private static Class<?> getClassByNameOrNull(final String
name) {
* specified initialization parameters.
*
* @param <T> type for the new instance
- * @param klass the Class object.
+ * @param klass The Class object.
* @param args array of objects to be passed as arguments to the
constructor
* call.
* @return A new object created by calling the constructor this object
diff --git a/src/main/java/org/apache/commons/crypto/utils/Transformation.java
b/src/main/java/org/apache/commons/crypto/utils/Transformation.java
index 2e3f3862..83517df5 100644
--- a/src/main/java/org/apache/commons/crypto/utils/Transformation.java
+++ b/src/main/java/org/apache/commons/crypto/utils/Transformation.java
@@ -64,9 +64,9 @@ public static Transformation parse(final String
transformation) throws NoSuchAlg
/**
* Constructs a new instance.
*
- * @param algorithm the algorithm name
- * @param mode the mode name
- * @param padding the padding name
+ * @param algorithm The algorithm name
+ * @param mode The mode name
+ * @param padding The padding name
*/
private Transformation(final String algorithm, final String mode, final
Padding padding) {
this.algorithm = algorithm;
@@ -77,9 +77,9 @@ private Transformation(final String algorithm, final String
mode, final Padding
/**
* Constructs a new instance.
*
- * @param algorithm the algorithm name
- * @param mode the mode name
- * @param padding the padding name
+ * @param algorithm The algorithm name
+ * @param mode The mode name
+ * @param padding The padding name
* @throws NoSuchPaddingException Thrown when the padding is unsupported.
*/
private Transformation(final String algorithm, final String mode, final
String padding) throws NoSuchPaddingException {
diff --git a/src/main/java/org/apache/commons/crypto/utils/Utils.java
b/src/main/java/org/apache/commons/crypto/utils/Utils.java
index 6f9bc709..eb655226 100644
--- a/src/main/java/org/apache/commons/crypto/utils/Utils.java
+++ b/src/main/java/org/apache/commons/crypto/utils/Utils.java
@@ -89,7 +89,7 @@ private static Properties createDefaultProperties() {
* Ensures the truth of an expression involving one or more parameters to
* the calling method.
*
- * @param expression a boolean expression.
+ * @param expression A boolean expression.
* @throws IllegalArgumentException if expression is {@code false}.
*/
public static void checkArgument(final boolean expression) {
@@ -101,8 +101,8 @@ public static void checkArgument(final boolean expression) {
/**
* Checks the truth of an expression.
*
- * @param expression a boolean expression.
- * @param errorMessage the exception message to use if the check fails;
will
+ * @param expression A boolean expression.
+ * @param errorMessage The exception message to use if the check fails;
will
* be converted to a string using {@link String#valueOf(Object)}.
* @throws IllegalArgumentException if expression is {@code false}.
*/
@@ -117,7 +117,7 @@ public static void checkArgument(final boolean expression,
final Object errorMes
* method is not {@code null}.
*
* @param <T> The type of the object reference to be checked.
- * @param reference an object reference.
+ * @param reference An object reference.
* @return The non-null reference that was validated.
* @throws NullPointerException if reference is {@code null}.
* @deprecated Use {@link Objects#requireNonNull(Object)}.
@@ -131,7 +131,7 @@ public static <T> T checkNotNull(final T reference) {
* Ensures the truth of an expression involving the state of the calling
* instance, but not involving any parameters to the calling method.
*
- * @param expression a boolean expression.
+ * @param expression A boolean expression.
* @throws IllegalStateException if expression is {@code false}.
*/
public static void checkState(final boolean expression) {
@@ -142,7 +142,7 @@ public static void checkState(final boolean expression) {
* Ensures the truth of an expression involving the state of the calling
* instance, but not involving any parameters to the calling method.
*
- * @param expression a boolean expression.
+ * @param expression A boolean expression.
* @param message Error message for the exception when the expression is
{@code false}.
* @throws IllegalStateException if expression is {@code false}.
*/
@@ -158,7 +158,7 @@ public static void checkState(final boolean expression,
final String message) {
*
* @param properties The {@link Properties} class represents a set of
* properties.
- * @param transformation the name of the transformation, e.g.,
+ * @param transformation The name of the transformation, e.g.,
* <em>AES/CBC/PKCS5Padding</em>.
* See the Java Cryptography Architecture Standard Algorithm Name
Documentation
* for information about standard transformation names.
@@ -200,7 +200,7 @@ public static Properties getProperties(final Properties
newProp) {
* Override the default DLL name if Crypto.JNI_LIBRARY_PATH is a valid
directory
* If Crypto.JNI_LIBRARY_NAME is defined, this overrides the default name.
*
- * @param name the default name, passed from native code
+ * @param name The default name, passed from native code
* @return The updated library path
* This method is designed for use from the DynamicLoader native code.
* Although it could all be implemented in native code, this hook method
@@ -229,9 +229,9 @@ static String libraryPath(final String name) {
* Splits class names sequence into substrings, Trim each substring into an
* entry, and returns a list of the entries.
*
- * @param classNames a string consist of a list of the entries joined by a
+ * @param classNames A string consist of a list of the entries joined by a
* delimiter, may be {@code null} or empty in which case an empty
list is returned.
- * @param separator a delimiter for the input string.
+ * @param separator A delimiter for the input string.
* @return A list of class entries.
*/
public static List<String> splitClassNames(final String classNames, final
String separator) {
diff --git
a/src/test/java/org/apache/commons/crypto/examples/CipherByteArrayExample.java
b/src/test/java/org/apache/commons/crypto/examples/CipherByteArrayExample.java
index f94e232a..23835d57 100644
---
a/src/test/java/org/apache/commons/crypto/examples/CipherByteArrayExample.java
+++
b/src/test/java/org/apache/commons/crypto/examples/CipherByteArrayExample.java
@@ -39,7 +39,7 @@ public class CipherByteArrayExample {
/**
* Converts String to UTF8 bytes
*
- * @param input the input string
+ * @param input The input string
* @return UTF8 bytes
*/
private static byte[] getUTF8Bytes(final String input) {
diff --git
a/src/test/java/org/apache/commons/crypto/examples/CipherByteBufferExample.java
b/src/test/java/org/apache/commons/crypto/examples/CipherByteBufferExample.java
index 4c7239f2..e67f5999 100644
---
a/src/test/java/org/apache/commons/crypto/examples/CipherByteBufferExample.java
+++
b/src/test/java/org/apache/commons/crypto/examples/CipherByteBufferExample.java
@@ -51,7 +51,7 @@ private static String asString(final ByteBuffer buffer) {
/**
* Converts String to UTF8 bytes
*
- * @param input the input string
+ * @param input The input string
* @return UTF8 bytes
*/
private static byte[] getUTF8Bytes(final String input) {
diff --git
a/src/test/java/org/apache/commons/crypto/examples/StreamExample.java
b/src/test/java/org/apache/commons/crypto/examples/StreamExample.java
index 4f52bce6..36204818 100644
--- a/src/test/java/org/apache/commons/crypto/examples/StreamExample.java
+++ b/src/test/java/org/apache/commons/crypto/examples/StreamExample.java
@@ -40,7 +40,7 @@ public class StreamExample {
/**
* Converts String to UTF8 bytes
*
- * @param input the input string
+ * @param input The input string
* @return UTF8 bytes
*/
private static byte[] getUTF8Bytes(final String input) {