// Websphere) which outputs ciphertext that's one byte too long, appending
// a trailing zero. We need to trim this byte.
output.put(tmpOutput.array(), 0, outputCapacity);
} else {
throw new KeyczarException("Expected " + outputCapacity + " bytes from encryption "
+ "operation but got " + ciphertextSize);
}
return outputCapacity;
} catch (GeneralSecurityException e) {
throw new KeyczarException(e);
}
}