public InputStream getEncryptionInputStream(
            Reference objectReference,
            byte[] encryptionKey,
            Hashtable decodeParams,
            InputStream input) {

        // find the name of the crypt filter used in the CF dictionary
        CryptFilterEntry cryptFilter = null;
        if (decodeParams != null){
            Name filterName = (Name)decodeParams.get("Name");
            // identity means don't use the cryprt filter or encryption at all
            // for the stream.
            if (filterName.equals("Identity")){
                return input;
            }else{
                // find the filter name in the encryption dictionary
                cryptFilter = encryptionDictionary.
                        getCryptFilter().getCryptFilterByName(filterName);

            }
        }
        // We default to the method specified in by StrmF in the security dictionary
        else if (encryptionDictionary.getCryptFilter() != null){
            cryptFilter = encryptionDictionary.getCryptFilter().getCryptFilterByName(
                    encryptionDictionary.getStmF());
        }

        // get the method used for the general encryption algorithm
        String algorithmType;
        if (cryptFilter != null){
            algorithmType = cryptFilter.getCryptFilterMethod().getName();
        }else{
            algorithmType = StandardEncryption.ENCRYPTION_TYPE_V2;
        }

        return standardEncryption.generalEncryptionInputStream(
                objectReference, encryptionKey, algorithmType, input);
    }