int implDoFinal(byte[] in, int inOff, int inLen, byte[] out, int outOff)
     throws ShortBufferException, IllegalBlockSizeException, BadPaddingException {
   return cipher.doFinal(in, inOff, inLen, out, outOff);
 }
 /**
  * Encrypts or decrypts data in a single-part operation, or finishes a multiple-part operation.
  * The data is encrypted or decrypted, depending on how this cipher was initialized.
  *
  * <p>The first <code>inputLen</code> bytes in the <code>input</code> buffer, starting at <code>
  * inputOffset</code>, and any input bytes that may have been buffered during a previous <code>
  * update</code> operation, are processed, with padding (if requested) being applied. The result
  * is stored in the <code>output</code> buffer, starting at <code>outputOffset</code>.
  *
  * <p>The cipher is reset to its initial state (uninitialized) after this call.
  *
  * @param input the input buffer
  * @param inputOffset the offset in <code>input</code> where the input starts
  * @param inputLen the input length
  * @param output the buffer for the result
  * @param outputOffset the offset in <code>output</code> where the result is stored
  * @return the number of bytes stored in <code>output</code>
  * @exception IllegalBlockSizeException if this cipher is a block cipher, no padding has been
  *     requested (only in encryption mode), and the total input length of the data processed by
  *     this cipher is not a multiple of block size
  * @exception ShortBufferException if the given output buffer is too small to hold the result
  * @exception BadPaddingException if this cipher is in decryption mode, and (un)padding has been
  *     requested, but the decrypted data is not bounded by the appropriate padding bytes
  */
 protected int engineDoFinal(
     byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)
     throws IllegalBlockSizeException, ShortBufferException, BadPaddingException {
   return core.doFinal(input, inputOffset, inputLen, output, outputOffset);
 }
 byte[] implDoFinal(byte[] in, int inOff, int inLen)
     throws IllegalBlockSizeException, BadPaddingException {
   return cipher.doFinal(in, inOff, inLen);
 }
 /**
  * Encrypts or decrypts data in a single-part operation, or finishes a multiple-part operation.
  * The data is encrypted or decrypted, depending on how this cipher was initialized.
  *
  * <p>The first <code>inputLen</code> bytes in the <code>input</code> buffer, starting at <code>
  * inputOffset</code>, and any input bytes that may have been buffered during a previous <code>
  * update</code> operation, are processed, with padding (if requested) being applied. The result
  * is stored in a new buffer.
  *
  * <p>The cipher is reset to its initial state (uninitialized) after this call.
  *
  * @param input the input buffer
  * @param inputOffset the offset in <code>input</code> where the input starts
  * @param inputLen the input length
  * @return the new buffer with the result
  * @exception IllegalBlockSizeException if this cipher is a block cipher, no padding has been
  *     requested (only in encryption mode), and the total input length of the data processed by
  *     this cipher is not a multiple of block size
  * @exception BadPaddingException if this cipher is in decryption mode, and (un)padding has been
  *     requested, but the decrypted data is not bounded by the appropriate padding bytes
  */
 protected byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen)
     throws IllegalBlockSizeException, BadPaddingException {
   return core.doFinal(input, inputOffset, inputLen);
 }