--- old/src/java.base/share/classes/javax/crypto/KeyAgreement.java 2015-08-18 14:21:02.721018888 +0400 +++ new/src/java.base/share/classes/javax/crypto/KeyAgreement.java 2015-08-18 14:21:02.513018898 +0400 @@ -40,24 +40,24 @@ * exchange) protocol. *
* The keys involved in establishing a shared secret are created by one of the
- * key generators (KeyPairGenerator
or
- * KeyGenerator
), a KeyFactory
, or as a result from
+ * key generators ({@code KeyPairGenerator} or
+ * {@code KeyGenerator}), a {@code KeyFactory}, or as a result from
* an intermediate phase of the key agreement protocol.
*
- *
For each of the correspondents in the key exchange, doPhase
+ *
For each of the correspondents in the key exchange, {@code doPhase}
* needs to be called. For example, if this key exchange is with one other
- * party, doPhase
needs to be called once, with the
- * lastPhase
flag set to true
.
+ * party, {@code doPhase} needs to be called once, with the
+ * {@code lastPhase} flag set to {@code true}.
* If this key exchange is
- * with two other parties, doPhase
needs to be called twice,
- * the first time setting the lastPhase
flag to
- * false
, and the second time setting it to true
.
+ * with two other parties, {@code doPhase} needs to be called twice,
+ * the first time setting the {@code lastPhase} flag to
+ * {@code false}, and the second time setting it to {@code true}.
* There may be any number of parties involved in a key exchange.
*
*
Every implementation of the Java platform is required to support the
- * following standard KeyAgreement
algorithm:
+ * following standard {@code KeyAgreement} algorithm:
*
KeyAgreement
object.
+ * Returns the algorithm name of this {@code KeyAgreement} object.
*
* This is the same name that was specified in one of the
- * getInstance
calls that created this
- * KeyAgreement
object.
+ * {@code getInstance} calls that created this
+ * {@code KeyAgreement} object.
*
- * @return the algorithm name of this KeyAgreement
object.
+ * @return the algorithm name of this {@code KeyAgreement} object.
*/
public final String getAlgorithm() {
return this.algorithm;
}
/**
- * Returns a KeyAgreement
object that implements the
+ * Returns a {@code KeyAgreement} object that implements the
* specified key agreement algorithm.
*
*
This method traverses the list of registered security Providers, @@ -157,7 +157,7 @@ * Java Cryptography Architecture Standard Algorithm Name Documentation
* for information about standard algorithm names. * - * @return the newKeyAgreement
object.
+ * @return the new {@code KeyAgreement} object.
*
* @exception NullPointerException if the specified algorithm
* is null.
@@ -186,7 +186,7 @@
}
/**
- * Returns a KeyAgreement
object that implements the
+ * Returns a {@code KeyAgreement} object that implements the
* specified key agreement algorithm.
*
* A new KeyAgreement object encapsulating the
@@ -206,7 +206,7 @@
*
* @param provider the name of the provider.
*
- * @return the new KeyAgreement
object.
+ * @return the new {@code KeyAgreement} object.
*
* @exception NullPointerException if the specified algorithm
* is null.
@@ -218,7 +218,7 @@
* @exception NoSuchProviderException if the specified provider is not
* registered in the security provider list.
*
- * @exception IllegalArgumentException if the provider
+ * @exception IllegalArgumentException if the {@code provider}
* is null or empty.
*
* @see java.security.Provider
@@ -233,7 +233,7 @@
}
/**
- * Returns a KeyAgreement
object that implements the
+ * Returns a {@code KeyAgreement} object that implements the
* specified key agreement algorithm.
*
*
A new KeyAgreement object encapsulating the
@@ -250,7 +250,7 @@
*
* @param provider the provider.
*
- * @return the new KeyAgreement
object.
+ * @return the new {@code KeyAgreement} object.
*
* @exception NullPointerException if the specified algorithm
* is null.
@@ -259,7 +259,7 @@
* implementation for the specified algorithm is not available
* from the specified Provider object.
*
- * @exception IllegalArgumentException if the provider
+ * @exception IllegalArgumentException if the {@code provider}
* is null.
*
* @see java.security.Provider
@@ -408,9 +408,9 @@
}
/**
- * Returns the provider of this KeyAgreement
object.
+ * Returns the provider of this {@code KeyAgreement} object.
*
- * @return the provider of this KeyAgreement
object
+ * @return the provider of this {@code KeyAgreement} object
*/
public final Provider getProvider() {
chooseFirstProvider();
@@ -447,10 +447,10 @@
* parameters required for this key agreement.
*
*
If the key agreement algorithm requires random bytes, it gets them
- * from the given source of randomness, random
.
+ * from the given source of randomness, {@code random}.
* However, if the underlying
* algorithm implementation does not require any random bytes,
- * random
is ignored.
+ * {@code random} is ignored.
*
* @param key the party's private information. For example, in the case
* of the Diffie-Hellman key agreement, this would be the party's own
@@ -570,9 +570,9 @@
/**
* Generates the shared secret and returns it in a new buffer.
*
- *
This method resets this KeyAgreement
object, so that it
+ *
This method resets this {@code KeyAgreement} object, so that it
* can be reused for further key agreements. Unless this key agreement is
- * reinitialized with one of the init
methods, the same
+ * reinitialized with one of the {@code init} methods, the same
* private information and algorithm parameters will be used for
* subsequent key agreements.
*
@@ -588,23 +588,23 @@
/**
* Generates the shared secret, and places it into the buffer
- * sharedSecret
, beginning at offset
inclusive.
+ * {@code sharedSecret}, beginning at {@code offset} inclusive.
*
- *
If the sharedSecret
buffer is too small to hold the
- * result, a ShortBufferException
is thrown.
+ *
If the {@code sharedSecret} buffer is too small to hold the + * result, a {@code ShortBufferException} is thrown. * In this case, this call should be repeated with a larger output buffer. * - *
This method resets this KeyAgreement
object, so that it
+ *
This method resets this {@code KeyAgreement} object, so that it
* can be reused for further key agreements. Unless this key agreement is
- * reinitialized with one of the init
methods, the same
+ * reinitialized with one of the {@code init} methods, the same
* private information and algorithm parameters will be used for
* subsequent key agreements.
*
* @param sharedSecret the buffer for the shared secret
- * @param offset the offset in sharedSecret
where the
+ * @param offset the offset in {@code sharedSecret} where the
* shared secret will be stored
*
- * @return the number of bytes placed into sharedSecret
+ * @return the number of bytes placed into {@code sharedSecret}
*
* @exception IllegalStateException if this key agreement has not been
* completed yet
@@ -619,12 +619,12 @@
}
/**
- * Creates the shared secret and returns it as a SecretKey
+ * Creates the shared secret and returns it as a {@code SecretKey}
* object of the specified algorithm.
*
- *
This method resets this KeyAgreement
object, so that it
+ *
This method resets this {@code KeyAgreement} object, so that it
* can be reused for further key agreements. Unless this key agreement is
- * reinitialized with one of the init
methods, the same
+ * reinitialized with one of the {@code init} methods, the same
* private information and algorithm parameters will be used for
* subsequent key agreements.
*