shiro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lhazlew...@apache.org
Subject svn commit: r1134755 - /shiro/trunk/core/src/main/java/org/apache/shiro/crypto/RandomNumberGenerator.java
Date Sat, 11 Jun 2011 21:02:14 GMT
Author: lhazlewood
Date: Sat Jun 11 21:02:14 2011
New Revision: 1134755

URL: http://svn.apache.org/viewvc?rev=1134755&view=rev
Log:
Minor JavaDoc fix

Modified:
    shiro/trunk/core/src/main/java/org/apache/shiro/crypto/RandomNumberGenerator.java

Modified: shiro/trunk/core/src/main/java/org/apache/shiro/crypto/RandomNumberGenerator.java
URL: http://svn.apache.org/viewvc/shiro/trunk/core/src/main/java/org/apache/shiro/crypto/RandomNumberGenerator.java?rev=1134755&r1=1134754&r2=1134755&view=diff
==============================================================================
--- shiro/trunk/core/src/main/java/org/apache/shiro/crypto/RandomNumberGenerator.java (original)
+++ shiro/trunk/core/src/main/java/org/apache/shiro/crypto/RandomNumberGenerator.java Sat
Jun 11 21:02:14 2011
@@ -32,12 +32,11 @@ import org.apache.shiro.util.ByteSource;
  * can be customized as necessary based on the application's needs</li>
  * <li>Default per-instance behavior can be customized on implementations, typically
via JavaBeans mutators.</li>
  * <li>Perhaps most important for Shiro end-users, tt can more easily be used as a
source of cryptographic seed data,
- * and the data returned is already in a more {@link ByteSource ByteSource} format in case
that data needs to be
- * {@link org.apache.shiro.util.ByteSource#toHex() hex} or
+ * and the data returned is already in a more convenient {@link ByteSource ByteSource} format
in case that data needs
+ * to be {@link org.apache.shiro.util.ByteSource#toHex() hex} or
  * {@link org.apache.shiro.util.ByteSource#toBase64() base64}-encoded.</li>
  * </ul>
  * For example, consider the following example generating password salts for new user accounts:
- *
  * <pre>
  * RandomNumberGenerator saltGenerator = new {@link org.apache.shiro.crypto.SecureRandomNumberGenerator
SecureRandomNumberGenerator}();
  * User user = new User();
@@ -53,15 +52,21 @@ public interface RandomNumberGenerator {
      * Generates a byte array of fixed length filled with random data, often useful for generating
salts,
      * initialization vectors or other seed data.  The length is specified as a configuration
      * value on the underlying implementation.
+     * <p/>
+     * If you'd like per-invocation control the number of bytes generated, use the
+     * {@link #nextBytes(int) nextBytes(int)} method instead.
      *
      * @return a byte array of fixed length filled with random data.
+     * @see #nextBytes(int)
      */
     ByteSource nextBytes();
 
     /**
      * Generates a byte array of the specified length filled with random data.
+     *
      * @param numBytes the number of bytes to be populated with random data.
      * @return a byte array of the specified length filled with random data.
+     * @see #nextBytes()
      */
     ByteSource nextBytes(int numBytes);
 }



Mime
View raw message