< prev index next >
src/java.base/share/classes/javax/crypto/SecretKeyFactory.java
Print this page
@@ -36,11 +36,11 @@
/**
* This class represents a factory for secret keys.
*
* <P> Key factories are used to convert <I>keys</I> (opaque
- * cryptographic keys of type <code>Key</code>) into <I>key specifications</I>
+ * cryptographic keys of type {@code Key}) into <I>key specifications</I>
* (transparent representations of the underlying key material), and vice
* versa.
* Secret key factories operate only on secret (symmetric) keys.
*
* <P> Key factories are bi-directional, i.e., they allow to build an opaque
@@ -51,20 +51,20 @@
* to find out which key specifications are supported by the
* {@link #generateSecret(java.security.spec.KeySpec) generateSecret} and
* {@link #getKeySpec(javax.crypto.SecretKey, java.lang.Class) getKeySpec}
* methods.
* For example, the DES secret-key factory supplied by the "SunJCE" provider
- * supports <code>DESKeySpec</code> as a transparent representation of DES
+ * supports {@code DESKeySpec} as a transparent representation of DES
* keys, and that provider's secret-key factory for Triple DES keys supports
- * <code>DESedeKeySpec</code> as a transparent representation of Triple DES
+ * {@code DESedeKeySpec} as a transparent representation of Triple DES
* keys.
*
* <p> Every implementation of the Java platform is required to support the
- * following standard <code>SecretKeyFactory</code> algorithms:
+ * following standard {@code SecretKeyFactory} algorithms:
* <ul>
- * <li><tt>DES</tt></li>
- * <li><tt>DESede</tt></li>
+ * <li>{@code DES}</li>
+ * <li>{@code DESede}</li>
* </ul>
* These algorithms are described in the <a href=
* "{@docRoot}/../technotes/guides/security/StandardNames.html#SecretKeyFactory">
* SecretKeyFactory section</a> of the
* Java Cryptography Architecture Standard Algorithm Name Documentation.
@@ -123,11 +123,11 @@
(algorithm + " SecretKeyFactory not available");
}
}
/**
- * Returns a <code>SecretKeyFactory</code> object that converts
+ * Returns a {@code SecretKeyFactory} object that converts
* secret keys of the specified algorithm.
*
* <p> This method traverses the list of registered security Providers,
* starting with the most preferred Provider.
* A new SecretKeyFactory object encapsulating the
@@ -142,11 +142,11 @@
* See the SecretKeyFactory section in the <a href=
* "{@docRoot}/../technotes/guides/security/StandardNames.html#SecretKeyFactory">
* Java Cryptography Architecture Standard Algorithm Name Documentation</a>
* for information about standard algorithm names.
*
- * @return the new <code>SecretKeyFactory</code> object.
+ * @return the new {@code SecretKeyFactory} object.
*
* @exception NullPointerException if the specified algorithm
* is null.
*
* @exception NoSuchAlgorithmException if no Provider supports a
@@ -159,11 +159,11 @@
throws NoSuchAlgorithmException {
return new SecretKeyFactory(algorithm);
}
/**
- * Returns a <code>SecretKeyFactory</code> object that converts
+ * Returns a {@code SecretKeyFactory} object that converts
* secret keys of the specified algorithm.
*
* <p> A new SecretKeyFactory object encapsulating the
* SecretKeyFactorySpi implementation from the specified provider
* is returned. The specified provider must be registered
@@ -179,11 +179,11 @@
* 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>SecretKeyFactory</code> object.
+ * @return the new {@code SecretKeyFactory} object.
*
* @exception NoSuchAlgorithmException if a SecretKeyFactorySpi
* implementation for the specified algorithm is not
* available from the specified provider.
*
@@ -191,11 +191,11 @@
* is null.
*
* @throws 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 SecretKeyFactory getInstance(String algorithm,
@@ -206,11 +206,11 @@
return new SecretKeyFactory((SecretKeyFactorySpi)instance.impl,
instance.provider, algorithm);
}
/**
- * Returns a <code>SecretKeyFactory</code> object that converts
+ * Returns a {@code SecretKeyFactory} object that converts
* secret keys of the specified algorithm.
*
* <p> A new SecretKeyFactory object encapsulating the
* SecretKeyFactorySpi implementation from the specified Provider
* object is returned. Note that the specified Provider object
@@ -223,20 +223,20 @@
* Java Cryptography Architecture Standard Algorithm Name Documentation</a>
* for information about standard algorithm names.
*
* @param provider the provider.
*
- * @return the new <code>SecretKeyFactory</code> object.
+ * @return the new {@code SecretKeyFactory} object.
*
* @exception NullPointerException if the specified algorithm
* is null.
*
* @exception NoSuchAlgorithmException if a SecretKeyFactorySpi
* 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 SecretKeyFactory getInstance(String algorithm,
@@ -246,30 +246,30 @@
return new SecretKeyFactory((SecretKeyFactorySpi)instance.impl,
instance.provider, algorithm);
}
/**
- * Returns the provider of this <code>SecretKeyFactory</code> object.
+ * Returns the provider of this {@code SecretKeyFactory} object.
*
- * @return the provider of this <code>SecretKeyFactory</code> object
+ * @return the provider of this {@code SecretKeyFactory} object
*/
public final Provider getProvider() {
synchronized (lock) {
// disable further failover after this call
serviceIterator = null;
return provider;
}
}
/**
- * Returns the algorithm name of this <code>SecretKeyFactory</code> object.
+ * Returns the algorithm name of this {@code SecretKeyFactory} object.
*
* <p>This is the same name that was specified in one of the
- * <code>getInstance</code> calls that created this
- * <code>SecretKeyFactory</code> object.
+ * {@code getInstance} calls that created this
+ * {@code SecretKeyFactory} object.
*
- * @return the algorithm name of this <code>SecretKeyFactory</code>
+ * @return the algorithm name of this {@code SecretKeyFactory}
* object.
*/
public final String getAlgorithm() {
return this.algorithm;
}
@@ -312,11 +312,11 @@
return null;
}
}
/**
- * Generates a <code>SecretKey</code> object from the provided key
+ * Generates a {@code SecretKey} object from the provided key
* specification (key material).
*
* @param keySpec the specification (key material) of the secret key
*
* @return the secret key
@@ -359,13 +359,13 @@
* @return the underlying key specification (key material) in the
* requested format
*
* @exception InvalidKeySpecException if the requested key specification is
* inappropriate for the given key (e.g., the algorithms associated with
- * <code>key</code> and <code>keySpec</code> do not match, or
- * <code>key</code> references a key on a cryptographic hardware device
- * whereas <code>keySpec</code> is the specification of a software-based
+ * {@code key} and {@code keySpec} do not match, or
+ * {@code key} references a key on a cryptographic hardware device
+ * whereas {@code keySpec} is the specification of a software-based
* key), or the given key cannot be dealt with
* (e.g., the given key has an algorithm or format not supported by this
* secret-key factory).
*/
public final KeySpec getKeySpec(SecretKey key, Class<?> keySpec)
< prev index next >