crypto/src/main/java/org/springframework/security/crypto/encrypt/CipherUtils.java
public static byte[] doFinal(Cipher cipher, byte[] input) {
		try {
			return cipher.doFinal(input);
		}
		catch (IllegalBlockSizeException e) {
			throw new IllegalStateException(
					"Unable to invoke Cipher due to illegal block size", e);
		}
		catch (BadPaddingException e) {
			throw new IllegalStateException("Unable to invoke Cipher due to bad padding",
					e);
		}
	}
public static byte[] doFinal(Cipher cipher, byte[] input) {
		try {
			return cipher.doFinal(input);
		}
		catch (IllegalBlockSizeException e) {
			throw new IllegalStateException(
					"Unable to invoke Cipher due to illegal block size", e);
		}
		catch (BadPaddingException e) {
			throw new IllegalStateException("Unable to invoke Cipher due to bad padding",
					e);
		}
	}
public static byte [ ] doFinal ( Cipher cipher , byte [ ] input ) { try { return cipher . doFinal ( input ) ; } catch ( IllegalBlockSizeException e ) { throw new IllegalStateException ( "Unable to invoke Cipher due to illegal block size" , e ) ; } catch ( BadPaddingException e ) { throw new IllegalStateException ( "Unable to invoke Cipher due to bad padding" , e ) ; } }
Invokes the Cipher to perform encryption or decryption (depending on the
initialized mode).
Invokes the Cipher to perform encryption or decryption ( depending on the initialized mode ) .