< prev index next >
src/java.base/share/classes/java/security/Signature.java
Print this page
rev 56290 : 8230648: Replace @exception tag with @throws in java.base
Summary: Minor coding style update of javadoc tag in any file in java.base
Reviewed-by: prappo, lancea
@@ -496,11 +496,11 @@
* of this call.
*
* @param publicKey the public key of the identity whose signature is
* going to be verified.
*
- * @exception InvalidKeyException if the key is invalid.
+ * @throws InvalidKeyException if the key is invalid.
*/
public final void initVerify(PublicKey publicKey)
throws InvalidKeyException {
engineInitVerify(publicKey);
state = VERIFY;
@@ -518,12 +518,12 @@
*
* @param publicKey the public key of the identity whose signature is
* going to be verified.
* @param params the parameters used for verifying this signature.
*
- * @exception InvalidKeyException if the key is invalid.
- * @exception InvalidAlgorithmParameterException if the params is invalid.
+ * @throws InvalidKeyException if the key is invalid.
+ * @throws InvalidAlgorithmParameterException if the params is invalid.
*/
final void initVerify(PublicKey publicKey, AlgorithmParameterSpec params)
throws InvalidKeyException, InvalidAlgorithmParameterException {
engineInitVerify(publicKey, params);
state = VERIFY;
@@ -569,11 +569,11 @@
* {@code InvalidKeyException} is thrown.
*
* @param certificate the certificate of the identity whose signature is
* going to be verified.
*
- * @exception InvalidKeyException if the public key in the certificate
+ * @throws InvalidKeyException if the public key in the certificate
* is not encoded properly or does not include required parameter
* information or cannot be used for digital signature purposes.
* @since 1.3
*/
public final void initVerify(Certificate certificate)
@@ -599,14 +599,14 @@
*
* @param certificate the certificate of the identity whose signature is
* going to be verified.
* @param params the parameters used for verifying this signature.
*
- * @exception InvalidKeyException if the public key in the certificate
+ * @throws InvalidKeyException if the public key in the certificate
* is not encoded properly or does not include required parameter
* information or cannot be used for digital signature purposes.
- * @exception InvalidAlgorithmParameterException if the params is invalid.
+ * @throws InvalidAlgorithmParameterException if the params is invalid.
*
* @since 13
*/
final void initVerify(Certificate certificate,
AlgorithmParameterSpec params)
@@ -626,11 +626,11 @@
* of this call.
*
* @param privateKey the private key of the identity whose signature
* is going to be generated.
*
- * @exception InvalidKeyException if the key is invalid.
+ * @throws InvalidKeyException if the key is invalid.
*/
public final void initSign(PrivateKey privateKey)
throws InvalidKeyException {
engineInitSign(privateKey);
state = SIGN;
@@ -649,11 +649,11 @@
* @param privateKey the private key of the identity whose signature
* is going to be generated.
*
* @param random the source of randomness for this signature.
*
- * @exception InvalidKeyException if the key is invalid.
+ * @throws InvalidKeyException if the key is invalid.
*/
public final void initSign(PrivateKey privateKey, SecureRandom random)
throws InvalidKeyException {
engineInitSign(privateKey, random);
state = SIGN;
@@ -672,12 +672,12 @@
* @param privateKey the private key of the identity whose signature
* is going to be generated.
* @param params the parameters used for generating signature.
* @param random the source of randomness for this signature.
*
- * @exception InvalidKeyException if the key is invalid.
- * @exception InvalidAlgorithmParameterException if the params is invalid
+ * @throws InvalidKeyException if the key is invalid.
+ * @throws InvalidAlgorithmParameterException if the params is invalid
*/
final void initSign(PrivateKey privateKey,
AlgorithmParameterSpec params, SecureRandom random)
throws InvalidKeyException, InvalidAlgorithmParameterException {
engineInitSign(privateKey, params, random);
@@ -701,11 +701,11 @@
* signer, if desired, via new calls to {@code update} and
* {@code sign}.
*
* @return the signature bytes of the signing operation's result.
*
- * @exception SignatureException if this signature object is not
+ * @throws SignatureException if this signature object is not
* initialized properly or if this signature algorithm is unable to
* process the input data provided.
*/
public final byte[] sign() throws SignatureException {
if (state == SIGN) {
@@ -734,15 +734,15 @@
* @param len number of bytes within {@code outbuf} allotted for the
* signature.
*
* @return the number of bytes placed into {@code outbuf}.
*
- * @exception SignatureException if this signature object is not
+ * @throws SignatureException if this signature object is not
* initialized properly, if this signature algorithm is unable to
* process the input data provided, or if {@code len} is less
* than the actual signature length.
- * @exception IllegalArgumentException if {@code outbuf} is {@code null},
+ * @throws IllegalArgumentException if {@code outbuf} is {@code null},
* or {@code offset} or {@code len} is less than 0, or the sum of
* {@code offset} and {@code len} is greater than the length of
* {@code outbuf}.
*
* @since 1.2
@@ -777,11 +777,11 @@
*
* @param signature the signature bytes to be verified.
*
* @return true if the signature was verified, false if not.
*
- * @exception SignatureException if this signature object is not
+ * @throws SignatureException if this signature object is not
* initialized properly, the passed-in signature is improperly
* encoded or of the wrong type, if this signature algorithm is unable to
* process the input data provided, etc.
*/
public final boolean verify(byte[] signature) throws SignatureException {
@@ -807,15 +807,15 @@
* @param offset the offset to start from in the array of bytes.
* @param length the number of bytes to use, starting at offset.
*
* @return true if the signature was verified, false if not.
*
- * @exception SignatureException if this signature object is not
+ * @throws SignatureException if this signature object is not
* initialized properly, the passed-in signature is improperly
* encoded or of the wrong type, if this signature algorithm is unable to
* process the input data provided, etc.
- * @exception IllegalArgumentException if the {@code signature}
+ * @throws IllegalArgumentException if the {@code signature}
* byte array is {@code null}, or the {@code offset} or {@code length}
* is less than 0, or the sum of the {@code offset} and
* {@code length} is greater than the length of the
* {@code signature} byte array.
* @since 1.4
@@ -844,11 +844,11 @@
/**
* Updates the data to be signed or verified by a byte.
*
* @param b the byte to use for the update.
*
- * @exception SignatureException if this signature object is not
+ * @throws SignatureException if this signature object is not
* initialized properly.
*/
public final void update(byte b) throws SignatureException {
if (state == VERIFY || state == SIGN) {
engineUpdate(b);
@@ -862,11 +862,11 @@
* Updates the data to be signed or verified, using the specified
* array of bytes.
*
* @param data the byte array to use for the update.
*
- * @exception SignatureException if this signature object is not
+ * @throws SignatureException if this signature object is not
* initialized properly.
*/
public final void update(byte[] data) throws SignatureException {
update(data, 0, data.length);
}
@@ -877,13 +877,13 @@
*
* @param data the array of bytes.
* @param off the offset to start from in the array of bytes.
* @param len the number of bytes to use, starting at offset.
*
- * @exception SignatureException if this signature object is not
+ * @throws SignatureException if this signature object is not
* initialized properly.
- * @exception IllegalArgumentException if {@code data} is {@code null},
+ * @throws IllegalArgumentException if {@code data} is {@code null},
* or {@code off} or {@code len} is less than 0, or the sum of
* {@code off} and {@code len} is greater than the length of
* {@code data}.
*/
public final void update(byte[] data, int off, int len)
@@ -913,11 +913,11 @@
* Upon return, the buffer's position will be equal to its limit;
* its limit will not have changed.
*
* @param data the ByteBuffer
*
- * @exception SignatureException if this signature object is not
+ * @throws SignatureException if this signature object is not
* initialized properly.
* @since 1.5
*/
public final void update(ByteBuffer data) throws SignatureException {
if ((state != SIGN) && (state != VERIFY)) {
@@ -974,11 +974,11 @@
* at this time.
*
* @param param the string identifier of the parameter.
* @param value the parameter value.
*
- * @exception InvalidParameterException if {@code param} is an
+ * @throws InvalidParameterException if {@code param} is an
* invalid parameter for this signature algorithm engine,
* the parameter is already set
* and cannot be set again, a security exception occurs, and so on.
*
* @see #getParameter
@@ -996,11 +996,11 @@
/**
* Initializes this signature engine with the specified parameter set.
*
* @param params the parameters
*
- * @exception InvalidAlgorithmParameterException if the given parameters
+ * @throws InvalidAlgorithmParameterException if the given parameters
* are inappropriate for this signature engine
*
* @see #getParameters
*/
public final void setParameter(AlgorithmParameterSpec params)
@@ -1041,11 +1041,11 @@
* @param param the string name of the parameter.
*
* @return the object that represents the parameter value, or {@code null} if
* there is none.
*
- * @exception InvalidParameterException if {@code param} is an invalid
+ * @throws InvalidParameterException if {@code param} is an invalid
* parameter for this engine, or another exception occurs while
* trying to get this parameter.
*
* @see #setParameter(String, Object)
*
@@ -1060,11 +1060,11 @@
/**
* Returns a clone if the implementation is cloneable.
*
* @return a clone if the implementation is cloneable.
*
- * @exception CloneNotSupportedException if this is called
+ * @throws CloneNotSupportedException if this is called
* on an implementation that does not support {@code Cloneable}.
*/
public Object clone() throws CloneNotSupportedException {
if (this instanceof Cloneable) {
return super.clone();
@@ -1124,11 +1124,11 @@
/**
* Returns a clone if the delegate is cloneable.
*
* @return a clone if the delegate is cloneable.
*
- * @exception CloneNotSupportedException if this is called on a
+ * @throws CloneNotSupportedException if this is called on a
* delegate that does not support {@code Cloneable}.
*/
public Object clone() throws CloneNotSupportedException {
chooseFirstProvider();
if (sigSpi instanceof Cloneable) {
< prev index next >