private static MediaType checkEncrypted(Set<String> ucNames, DirectoryEntry root) {
        //figure out if encrypted/pw protected first
        if (ucNames.contains(DATA_SPACES)) {
            //OLE2 drm encrypted -- TIKA-3666
            if (findRecursively(root, DRM_DATA_SPACE, 0, 10)) {
                return DRM_ENCRYPTED;
            }
        }

        if (ucNames.contains(ENCRYPTED_PACKAGE)) {
            if (ucNames.contains(ENCRYPTED_INFO)) {
                // This is a protected OOXML document, which is an OLE2 file
                //  with an Encrypted Stream which holds the OOXML data
                // Without decrypting the stream, we can't tell what kind of
                //  OOXML file we have. Return a general OOXML Protected type,
                //  and hope the name based detection can guess the rest!

                // This is the standard issue method of encryption for ooxml and
                // is supported by POI

                //Until Tika 1.23, we also required: && names.contains("\u0006DataSpaces")
                //See TIKA-2982
                return OOXML_PROTECTED;
            } else if (ucNames.contains(DATA_SPACES)) {
                //Try to look for the DRMEncrypted type (TIKA-3666); as of 5.2.0, this is not
                // supported by POI, but we should still detect it.

                //Do we also want to look for "DRMEncryptedTransform"?
                if (findRecursively(root, DRM_ENCRYPTED_DATA_SPACE, 0, 10)) {
                    return DRM_ENCRYPTED;
                }
            }
        }
        return null;
    }
Internal detection of the specific kind of OLE2 document, based on the
names of the top-level streams within the file. In some cases the
detection may need access to the root {@link DirectoryEntry} of that file
for best results. The entry can be given as a second, optional argument.

<p/>
Following

<a href="https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cfb/60fe8611-66c3-496b-b70d-a504c94c9ace">2.6.1 of MS-CFB </a>,
The detection is performed on case insensitive entry names.

@param anyCaseNames
@param root
@return
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/detect/microsoft/POIFSContainerDetector.java