< prev index next >

src/java.base/share/classes/java/security/SignatureSpi.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

*** 62,72 **** * public key for verification operations. * * @param publicKey the public key of the identity whose signature is * going to be verified. * ! * @exception InvalidKeyException if the key is improperly * encoded, parameters are missing, and so on. */ protected abstract void engineInitVerify(PublicKey publicKey) throws InvalidKeyException; --- 62,72 ---- * public key for verification operations. * * @param publicKey the public key of the identity whose signature is * going to be verified. * ! * @throws InvalidKeyException if the key is improperly * encoded, parameters are missing, and so on. */ protected abstract void engineInitVerify(PublicKey publicKey) throws InvalidKeyException;
*** 76,88 **** * * @param publicKey the public key of the identity whose signature is * going to be verified. * @param params the parameters for generating this signature * ! * @exception InvalidKeyException if the key is improperly * encoded, does not work with the given parameters, and so on. ! * @exception InvalidAlgorithmParameterException if the given parameters * is invalid. */ void engineInitVerify(PublicKey publicKey, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException { --- 76,88 ---- * * @param publicKey the public key of the identity whose signature is * going to be verified. * @param params the parameters for generating this signature * ! * @throws InvalidKeyException if the key is improperly * encoded, does not work with the given parameters, and so on. ! * @throws InvalidAlgorithmParameterException if the given parameters * is invalid. */ void engineInitVerify(PublicKey publicKey, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException {
*** 102,112 **** * private key for signing operations. * * @param privateKey the private key of the identity whose signature * will be generated. * ! * @exception InvalidKeyException if the key is improperly * encoded, parameters are missing, and so on. */ protected abstract void engineInitSign(PrivateKey privateKey) throws InvalidKeyException; --- 102,112 ---- * private key for signing operations. * * @param privateKey the private key of the identity whose signature * will be generated. * ! * @throws InvalidKeyException if the key is improperly * encoded, parameters are missing, and so on. */ protected abstract void engineInitSign(PrivateKey privateKey) throws InvalidKeyException;
*** 119,129 **** * * @param privateKey the private key of the identity whose signature * will be generated. * @param random the source of randomness * ! * @exception InvalidKeyException if the key is improperly * encoded, parameters are missing, and so on. */ protected void engineInitSign(PrivateKey privateKey, SecureRandom random) throws InvalidKeyException { --- 119,129 ---- * * @param privateKey the private key of the identity whose signature * will be generated. * @param random the source of randomness * ! * @throws InvalidKeyException if the key is improperly * encoded, parameters are missing, and so on. */ protected void engineInitSign(PrivateKey privateKey, SecureRandom random) throws InvalidKeyException {
*** 141,153 **** * @param privateKey the private key of the identity whose signature * will be generated. * @param params the parameters for generating this signature * @param random the source of randomness * ! * @exception InvalidKeyException if the key is improperly * encoded, parameters are missing, and so on. ! * @exception InvalidAlgorithmParameterException if the parameters is * invalid. */ void engineInitSign(PrivateKey privateKey, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException { --- 141,153 ---- * @param privateKey the private key of the identity whose signature * will be generated. * @param params the parameters for generating this signature * @param random the source of randomness * ! * @throws InvalidKeyException if the key is improperly * encoded, parameters are missing, and so on. ! * @throws InvalidAlgorithmParameterException if the parameters is * invalid. */ void engineInitSign(PrivateKey privateKey, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException {
*** 166,176 **** * Updates the data to be signed or verified * using the specified byte. * * @param b the byte to use for the update. * ! * @exception SignatureException if the engine is not initialized * properly. */ protected abstract void engineUpdate(byte b) throws SignatureException; /** --- 166,176 ---- * Updates the data to be signed or verified * using the specified byte. * * @param b the byte to use for the update. * ! * @throws SignatureException if the engine is not initialized * properly. */ protected abstract void engineUpdate(byte b) throws SignatureException; /**
*** 179,189 **** * * @param b 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 the engine is not initialized * properly */ protected abstract void engineUpdate(byte[] b, int off, int len) throws SignatureException; --- 179,189 ---- * * @param b 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 * ! * @throws SignatureException if the engine is not initialized * properly */ protected abstract void engineUpdate(byte[] b, int off, int len) throws SignatureException;
*** 232,242 **** * The format of the signature depends on the underlying * signature scheme. * * @return the signature bytes of the signing operation's result. * ! * @exception SignatureException if the engine is not * initialized properly or if this signature algorithm is unable to * process the input data provided. */ protected abstract byte[] engineSign() throws SignatureException; --- 232,242 ---- * The format of the signature depends on the underlying * signature scheme. * * @return the signature bytes of the signing operation's result. * ! * @throws SignatureException if the engine is not * initialized properly or if this signature algorithm is unable to * process the input data provided. */ protected abstract byte[] engineSign() throws SignatureException;
*** 271,281 **** * This parameter is ignored if its value is greater than or equal to * the actual signature length. * * @return the number of bytes placed into {@code outbuf} * ! * @exception SignatureException if the engine 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. * * @since 1.2 --- 271,281 ---- * This parameter is ignored if its value is greater than or equal to * the actual signature length. * * @return the number of bytes placed into {@code outbuf} * ! * @throws SignatureException if the engine 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. * * @since 1.2
*** 301,311 **** * * @param sigBytes the signature bytes to be verified. * * @return true if the signature was verified, false if not. * ! * @exception SignatureException if the engine 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. */ protected abstract boolean engineVerify(byte[] sigBytes) --- 301,311 ---- * * @param sigBytes the signature bytes to be verified. * * @return true if the signature was verified, false if not. * ! * @throws SignatureException if the engine 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. */ protected abstract boolean engineVerify(byte[] sigBytes)
*** 322,332 **** * @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 the engine 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. * @since 1.4 */ --- 322,332 ---- * @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. * ! * @throws SignatureException if the engine 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. * @since 1.4 */
*** 350,360 **** * * @param param the string identifier of the parameter. * * @param value the parameter value. * ! * @exception 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. * * @deprecated Replaced by {@link --- 350,360 ---- * * @param param the string identifier of the parameter. * * @param value the parameter value. * ! * @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. * * @deprecated Replaced by {@link
*** 369,382 **** * <p>This method is overridden by providers to initialize * this signature engine with the specified parameter set. * * @param params the parameters * ! * @exception UnsupportedOperationException if this method is not * overridden by a provider * ! * @exception InvalidAlgorithmParameterException if this method is * overridden by a provider and the given parameters * are inappropriate for this signature engine */ protected void engineSetParameter(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { --- 369,382 ---- * <p>This method is overridden by providers to initialize * this signature engine with the specified parameter set. * * @param params the parameters * ! * @throws UnsupportedOperationException if this method is not * overridden by a provider * ! * @throws InvalidAlgorithmParameterException if this method is * overridden by a provider and the given parameters * are inappropriate for this signature engine */ protected void engineSetParameter(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException {
*** 395,405 **** * signature implementation supports it and can successfully generate * them. Otherwise, {@code null} is returned. * * @return the parameters used with this signature engine, or {@code null} * ! * @exception UnsupportedOperationException if this method is * not overridden by a provider * @since 1.4 */ protected AlgorithmParameters engineGetParameters() { throw new UnsupportedOperationException(); --- 395,405 ---- * signature implementation supports it and can successfully generate * them. Otherwise, {@code null} is returned. * * @return the parameters used with this signature engine, or {@code null} * ! * @throws UnsupportedOperationException if this method is * not overridden by a provider * @since 1.4 */ protected AlgorithmParameters engineGetParameters() { throw new UnsupportedOperationException();
*** 419,429 **** * @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 parameter for this engine, or another exception occurs while * trying to get this parameter. * * @deprecated */ --- 419,429 ---- * @param param the string name of the parameter. * * @return the object that represents the parameter value, or {@code null} if * there is none. * ! * @throws InvalidParameterException if {@code param} is an * invalid parameter for this engine, or another exception occurs while * trying to get this parameter. * * @deprecated */
*** 434,444 **** /** * Returns a clone if the implementation is cloneable. * * @return a clone if the implementation is cloneable. * ! * @exception 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(); --- 434,444 ---- /** * Returns a clone if the implementation is cloneable. * * @return a clone if the implementation is cloneable. * ! * @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();
< prev index next >