Author: painter
Date: Mon Nov 5 16:04:44 2018
New Revision: 1845821
URL: http://svn.apache.org/viewvc?rev=1845821&view=rev
Log:
Fix/update javadoc for fulcrum-yaafi-crypto
Modified:
turbine/fulcrum/trunk/yaafi-crypto/src/java/org/apache/fulcrum/jce/crypto/PasswordFactory.java
turbine/fulcrum/trunk/yaafi-crypto/src/java/org/apache/fulcrum/jce/crypto/SmartDecryptingInputStream.java
Modified:
turbine/fulcrum/trunk/yaafi-crypto/src/java/org/apache/fulcrum/jce/crypto/PasswordFactory.java
URL:
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/yaafi-crypto/src/java/org/apache/fulcrum/jce/crypto/PasswordFactory.java?rev=1845821&r1=1845820&r2=1845821&view=diff
==============================================================================
---
turbine/fulcrum/trunk/yaafi-crypto/src/java/org/apache/fulcrum/jce/crypto/PasswordFactory.java
(original)
+++
turbine/fulcrum/trunk/yaafi-crypto/src/java/org/apache/fulcrum/jce/crypto/PasswordFactory.java
Mon Nov 5 16:04:44 2018
@@ -40,7 +40,12 @@ public class PasswordFactory implements
{
/**
+ * Create a new password
+ *
* @return a default password using "xxxx-xxxx-xxxx-xxxxx"
+ *
+ * @throws NoSuchAlgorithmException the encryption algorithm is not
supported
+ * @throws UnsupportedEncodingException the requested encoding is not
supported
*/
public static char[] create()
throws NoSuchAlgorithmException, UnsupportedEncodingException
@@ -53,8 +58,13 @@ public class PasswordFactory implements
}
/**
+ * Create a new password using a seed
+ *
* @param seed the default password supplied by the caller
* @return a password using "xxxx-xxxx-xxxx-xxxxx"
+ *
+ * @throws NoSuchAlgorithmException the encryption algorithm is not
supported
+ * @throws UnsupportedEncodingException the requested encoding is not
supported
*/
public static char[] create( String seed )
throws NoSuchAlgorithmException, UnsupportedEncodingException
@@ -67,6 +77,8 @@ public class PasswordFactory implements
/**
* @param seed the default password supplied by the caller
* @return a password using "xxxx-xxxx-xxxx-xxxxx"
+ * @throws NoSuchAlgorithmException the encryption algorithm is not
supported
+ * @throws UnsupportedEncodingException the requested encoding is not
supported
*/
public static final char[] create( char[] seed )
throws NoSuchAlgorithmException, UnsupportedEncodingException
@@ -131,7 +143,6 @@ public class PasswordFactory implements
stringBuffer.append( Long.toHexString( long4 ).substring( 0, 5 ) );
// copy the password
-
result = new char[stringBuffer.length()];
for (int i = 0; i < stringBuffer.length(); i++)
@@ -140,7 +151,6 @@ public class PasswordFactory implements
}
// wipe out the StringBuilder
-
for (int i = 0; i < stringBuffer.length(); i++)
{
stringBuffer.setCharAt( i, ' ' );
Modified:
turbine/fulcrum/trunk/yaafi-crypto/src/java/org/apache/fulcrum/jce/crypto/SmartDecryptingInputStream.java
URL:
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/yaafi-crypto/src/java/org/apache/fulcrum/jce/crypto/SmartDecryptingInputStream.java?rev=1845821&r1=1845820&r2=1845821&view=diff
==============================================================================
---
turbine/fulcrum/trunk/yaafi-crypto/src/java/org/apache/fulcrum/jce/crypto/SmartDecryptingInputStream.java
(original)
+++
turbine/fulcrum/trunk/yaafi-crypto/src/java/org/apache/fulcrum/jce/crypto/SmartDecryptingInputStream.java
Mon Nov 5 16:04:44 2018
@@ -44,6 +44,8 @@ public class SmartDecryptingInputStream
*
* @param cryptoStreamFactory the CryptoStreamFactory for creating a
cipher stream
* @param is the input stream to be decrypted
+ * @throws IOException if file not found
+ * @throws GeneralSecurityException if security check fails
*/
public SmartDecryptingInputStream(
CryptoStreamFactory cryptoStreamFactory,
@@ -59,6 +61,9 @@ public class SmartDecryptingInputStream
* @param cryptoStreamFactory the CryptoStreamFactory for creating a
cipher stream
* @param is the input stream to be decrypted
* @param password the password for decryption
+ *
+ * @throws IOException if file not found
+ * @throws GeneralSecurityException if security check fails
*/
public SmartDecryptingInputStream(
CryptoStreamFactory cryptoStreamFactory,
@@ -116,7 +121,7 @@ public class SmartDecryptingInputStream
*
* @param content the data to be examined
* @return true if this is an encrypted file
- * @exception IOException unable to read the content
+ * @throws IOException unable to read the content
*/
private boolean isEncrypted( byte[] content )
throws IOException