From 747a3c99ecda1a99955c86b8f045b6459793f2a8 Mon Sep 17 00:00:00 2001 From: David Hook Date: Sun, 30 Mar 2014 11:43:37 +1100 Subject: JavaDoc fixes --- .../crypto/engines/DESedeWrapEngine.java | 28 ++++++++++++---------- .../bouncycastle/crypto/engines/RC2WrapEngine.java | 6 +++-- 2 files changed, 19 insertions(+), 15 deletions(-) (limited to 'core/src/main/java/org') diff --git a/core/src/main/java/org/bouncycastle/crypto/engines/DESedeWrapEngine.java b/core/src/main/java/org/bouncycastle/crypto/engines/DESedeWrapEngine.java index a3c72ccb..923a79cd 100644 --- a/core/src/main/java/org/bouncycastle/crypto/engines/DESedeWrapEngine.java +++ b/core/src/main/java/org/bouncycastle/crypto/engines/DESedeWrapEngine.java @@ -58,8 +58,8 @@ public class DESedeWrapEngine /** * Method init * - * @param forWrapping - * @param param + * @param forWrapping true if for wrapping, false otherwise. + * @param param necessary parameters, may include KeyParameter, ParametersWithRandom, and ParametersWithIV */ public void init(boolean forWrapping, CipherParameters param) { @@ -128,9 +128,9 @@ public class DESedeWrapEngine /** * Method wrap * - * @param in - * @param inOff - * @param inLen + * @param in byte array containing the encoded key. + * @param inOff off set into in that the data starts at. + * @param inLen length of the data. * @return the wrapped bytes. */ public byte[] wrap(byte[] in, int inOff, int inLen) @@ -199,9 +199,9 @@ public class DESedeWrapEngine /** * Method unwrap * - * @param in - * @param inOff - * @param inLen + * @param in byte array containing the wrapped key. + * @param inOff off set into in that the data starts at. + * @param inLen length of the data. * @return the unwrapped bytes. * @throws InvalidCipherTextException */ @@ -305,10 +305,11 @@ public class DESedeWrapEngine * - Compute the 20 octet SHA-1 hash on the key being wrapped. * - Use the first 8 octets of this hash as the checksum value. * - * @param key + * For details see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum. + * + * @param key the key to check, * @return the CMS checksum. * @throws RuntimeException - * @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum */ private byte[] calculateCMSKeyChecksum( byte[] key) @@ -324,10 +325,11 @@ public class DESedeWrapEngine } /** - * @param key - * @param checksum + * For details see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum + * + * @param key key to be validated. + * @param checksum the checksum. * @return true if okay, false otherwise. - * @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum */ private boolean checkCMSKeyChecksum( byte[] key, diff --git a/core/src/main/java/org/bouncycastle/crypto/engines/RC2WrapEngine.java b/core/src/main/java/org/bouncycastle/crypto/engines/RC2WrapEngine.java index 185387d8..ec82b1aa 100644 --- a/core/src/main/java/org/bouncycastle/crypto/engines/RC2WrapEngine.java +++ b/core/src/main/java/org/bouncycastle/crypto/engines/RC2WrapEngine.java @@ -350,10 +350,11 @@ public class RC2WrapEngine * - Compute the 20 octet SHA-1 hash on the key being wrapped. * - Use the first 8 octets of this hash as the checksum value. * + * For details see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum * @param key * @return * @throws RuntimeException - * @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum + * */ private byte[] calculateCMSKeyChecksum( byte[] key) @@ -369,10 +370,11 @@ public class RC2WrapEngine } /** + * For details see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum + * * @param key * @param checksum * @return - * @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum */ private boolean checkCMSKeyChecksum( byte[] key, -- cgit v1.2.3