< prev index next >

src/java.base/share/classes/javax/crypto/KeyGenerator.java

Print this page

        

@@ -36,11 +36,11 @@
 import sun.security.util.Debug;
 
 /**
  * This class provides the functionality of a secret (symmetric) key generator.
  *
- * <p>Key generators are constructed using one of the <code>getInstance</code>
+ * <p>Key generators are constructed using one of the {@code getInstance}
  * class methods of this class.
  *
  * <p>KeyGenerator objects are reusable, i.e., after a key has been
  * generated, the same KeyGenerator object can be re-used to generate further
  * keys.

@@ -55,46 +55,46 @@
  * <i>source of randomness</i>.
  * There is an
  * {@link #init(int, java.security.SecureRandom) init}
  * method in this KeyGenerator class that takes these two universally
  * shared types of arguments. There is also one that takes just a
- * <code>keysize</code> argument, and uses the SecureRandom implementation
+ * {@code keysize} argument, and uses the SecureRandom implementation
  * of the highest-priority installed provider as the source of randomness
  * (or a system-provided source of randomness if none of the installed
  * providers supply a SecureRandom implementation), and one that takes just a
  * source of randomness.
  *
  * <p>Since no other parameters are specified when you call the above
- * algorithm-independent <code>init</code> methods, it is up to the
+ * algorithm-independent {@code init} methods, it is up to the
  * provider what to do about the algorithm-specific parameters (if any) to be
  * associated with each of the keys.
  *
  * <li><b>Algorithm-Specific Initialization</b>
  * <p>For situations where a set of algorithm-specific parameters already
  * exists, there are two
  * {@link #init(java.security.spec.AlgorithmParameterSpec) init}
- * methods that have an <code>AlgorithmParameterSpec</code>
- * argument. One also has a <code>SecureRandom</code> argument, while the
+ * methods that have an {@code AlgorithmParameterSpec}
+ * argument. One also has a {@code SecureRandom} argument, while the
  * other uses the SecureRandom implementation
  * of the highest-priority installed provider as the source of randomness
  * (or a system-provided source of randomness if none of the installed
  * providers supply a SecureRandom implementation).
  * </ul>
  *
  * <p>In case the client does not explicitly initialize the KeyGenerator
- * (via a call to an <code>init</code> method), each provider must
+ * (via a call to an {@code init} method), each provider must
  * supply (and document) a default initialization.
  *
  * <p> Every implementation of the Java platform is required to support the
- * following standard <code>KeyGenerator</code> algorithms with the keysizes in
+ * following standard {@code KeyGenerator} algorithms with the keysizes in
  * parentheses:
  * <ul>
- * <li><tt>AES</tt> (128)</li>
- * <li><tt>DES</tt> (56)</li>
- * <li><tt>DESede</tt> (168)</li>
- * <li><tt>HmacSHA1</tt></li>
- * <li><tt>HmacSHA256</tt></li>
+ * <li>{@code AES} (128)</li>
+ * <li>{@code DES} (56)</li>
+ * <li>{@code DESede} (168)</li>
+ * <li>{@code HmacSHA1}</li>
+ * <li>{@code HmacSHA256}</li>
  * </ul>
  * These algorithms are described in the <a href=
  * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyGenerator">
  * KeyGenerator section</a> of the
  * Java Cryptography Architecture Standard Algorithm Name Documentation.

@@ -175,24 +175,24 @@
                 this.provider.getName());
         }
     }
 
     /**
-     * Returns the algorithm name of this <code>KeyGenerator</code> object.
+     * Returns the algorithm name of this {@code KeyGenerator} object.
      *
      * <p>This is the same name that was specified in one of the
-     * <code>getInstance</code> calls that created this
-     * <code>KeyGenerator</code> object.
+     * {@code getInstance} calls that created this
+     * {@code KeyGenerator} object.
      *
-     * @return the algorithm name of this <code>KeyGenerator</code> object.
+     * @return the algorithm name of this {@code KeyGenerator} object.
      */
     public final String getAlgorithm() {
         return this.algorithm;
     }
 
     /**
-     * Returns a <code>KeyGenerator</code> object that generates secret keys
+     * Returns a {@code KeyGenerator} object that generates secret keys
      * for the specified algorithm.
      *
      * <p> This method traverses the list of registered security Providers,
      * starting with the most preferred Provider.
      * A new KeyGenerator object encapsulating the

@@ -206,11 +206,11 @@
      * See the KeyGenerator section in the <a href=
      * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyGenerator">
      * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
      * for information about standard algorithm names.
      *
-     * @return the new <code>KeyGenerator</code> object.
+     * @return the new {@code KeyGenerator} object.
      *
      * @exception NullPointerException if the specified algorithm is null.
      *
      * @exception NoSuchAlgorithmException if no Provider supports a
      *          KeyGeneratorSpi implementation for the

@@ -222,11 +222,11 @@
             throws NoSuchAlgorithmException {
         return new KeyGenerator(algorithm);
     }
 
     /**
-     * Returns a <code>KeyGenerator</code> object that generates secret keys
+     * Returns a {@code KeyGenerator} object that generates secret keys
      * for the specified algorithm.
      *
      * <p> A new KeyGenerator object encapsulating the
      * KeyGeneratorSpi implementation from the specified provider
      * is returned.  The specified provider must be registered

@@ -241,22 +241,22 @@
      * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
      * for information about standard algorithm names.
      *
      * @param provider the name of the provider.
      *
-     * @return the new <code>KeyGenerator</code> object.
+     * @return the new {@code KeyGenerator} object.
      *
      * @exception NullPointerException if the specified algorithm is null.
      *
      * @exception NoSuchAlgorithmException if a KeyGeneratorSpi
      *          implementation for the specified algorithm is not
      *          available from the specified provider.
      *
      * @exception NoSuchProviderException if the specified provider is not
      *          registered in the security provider list.
      *
-     * @exception IllegalArgumentException if the <code>provider</code>
+     * @exception IllegalArgumentException if the {@code provider}
      *          is null or empty.
      *
      * @see java.security.Provider
      */
     public static final KeyGenerator getInstance(String algorithm,

@@ -267,11 +267,11 @@
         return new KeyGenerator((KeyGeneratorSpi)instance.impl,
                 instance.provider, algorithm);
     }
 
     /**
-     * Returns a <code>KeyGenerator</code> object that generates secret keys
+     * Returns a {@code KeyGenerator} object that generates secret keys
      * for the specified algorithm.
      *
      * <p> A new KeyGenerator object encapsulating the
      * KeyGeneratorSpi implementation from the specified Provider
      * object is returned.  Note that the specified Provider object

@@ -283,19 +283,19 @@
      * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
      * for information about standard algorithm names.
      *
      * @param provider the provider.
      *
-     * @return the new <code>KeyGenerator</code> object.
+     * @return the new {@code KeyGenerator} object.
      *
      * @exception NullPointerException if the specified algorithm is null.
      *
      * @exception NoSuchAlgorithmException if a KeyGeneratorSpi
      *          implementation for the specified algorithm is not available
      *          from the specified Provider object.
      *
-     * @exception IllegalArgumentException if the <code>provider</code>
+     * @exception IllegalArgumentException if the {@code provider}
      *          is null.
      *
      * @see java.security.Provider
      */
     public static final KeyGenerator getInstance(String algorithm,

@@ -305,13 +305,13 @@
         return new KeyGenerator((KeyGeneratorSpi)instance.impl,
                 instance.provider, algorithm);
     }
 
     /**
-     * Returns the provider of this <code>KeyGenerator</code> object.
+     * Returns the provider of this {@code KeyGenerator} object.
      *
-     * @return the provider of this <code>KeyGenerator</code> object
+     * @return the provider of this {@code KeyGenerator} object
      */
     public final Provider getProvider() {
         synchronized (lock) {
             disableFailover();
             return provider;

@@ -435,11 +435,11 @@
      * set and a user-provided source of randomness.
      *
      * @param params the key generation parameters
      * @param random the source of randomness for this key generator
      *
-     * @exception InvalidAlgorithmParameterException if <code>params</code> is
+     * @exception InvalidAlgorithmParameterException if {@code params} is
      * inappropriate for this key generator
      */
     public final void init(AlgorithmParameterSpec params, SecureRandom random)
         throws InvalidAlgorithmParameterException
     {
< prev index next >