private S3Object decipher(GetObjectRequest req,
            long[] desiredRange, long[] cryptoRange,
            S3Object retrieved) {
        S3ObjectWrapper wrapped = new S3ObjectWrapper(retrieved, req.getS3ObjectId());
        // Check if encryption info is in object metadata
        if (wrapped.hasEncryptionInfo())
            return decipherWithMetadata(req, desiredRange, cryptoRange, wrapped);
        // Check if encrypted info is in an instruction file
        S3ObjectWrapper ifile = fetchInstructionFile(req.getS3ObjectId(), null);
        if (ifile != null) {
            try {
                return decipherWithInstructionFile(req, desiredRange,
                        cryptoRange, wrapped, ifile);
            } finally {
                closeQuietly(ifile, log);
            }
        }
        if (isStrict()) {
            closeQuietly(wrapped, log);
            throw new SecurityException("Unencrypted object found, cannot be decrypted in mode "
                    + StrictAuthenticatedEncryption + "; bucket name: "
                    + retrieved.getBucketName() + ", key: "
                    + retrieved.getKey());
        }

        if (cryptoConfig.isUnsafeUndecryptableObjectPassthrough()) {
            log.warn(String.format(
                "Unable to detect encryption information for object '%s' in bucket '%s'. "
                + "Returning object without decryption.",
                retrieved.getKey(),
                retrieved.getBucketName()));
            // Adjust the output to the desired range of bytes.
            S3ObjectWrapper adjusted = adjustToDesiredRange(wrapped, desiredRange, null);
            return adjusted.getS3Object();
        } else {
            closeQuietly(wrapped, log);
            throw new SecurityException("Instruction file not found for S3 object with bucket name: "
                    + retrieved.getBucketName() + ", key: "
                    + retrieved.getKey());
        }
    }
Returns true if a strict encryption mode is in use in the current crypto
module; false otherwise.
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/v2/S3CryptoModuleAE.java