public ByteSource encrypt(byte[] plaintext, byte[] key) {
        byte[] ivBytes = null;
        boolean generate = isGenerateInitializationVectors(false);
        if (generate) {
            ivBytes = generateInitializationVector(false);
            if (ivBytes == null || ivBytes.length == 0) {
                throw new IllegalStateException("Initialization vector generation is enabled - generated vector " +
                        "cannot be null or empty.");
            }
        }
        return encrypt(plaintext, key, ivBytes, generate);
    }
Returns the transformation string to use with the {@link javax.crypto.Cipher#getInstance} invocation when
creating a new {@code Cipher} instance.  This default implementation always returns
{@link #getAlgorithmName() getAlgorithmName()}.  Block cipher implementations will want to override this method
to support appending cipher operation modes and padding schemes.

@param streaming if the transformation string is going to be used for a Cipher for stream-based encryption or not.
@return the transformation string to use with the {@link javax.crypto.Cipher#getInstance} invocation when
        creating a new {@code Cipher} instance.
src/main/java/org/apache/shiro/crypto/cipher/JcaCipherService.java