'A dictionary of KoboFiles inside the book.
The dictionary keys are the relative pathnames, which are
the same as the pathnames inside the book \'zip\' file.'

@property
def encryptedfiles(self):

    if (self.type == 'drm-free'):
        return self._encryptedfiles
    if (len(self._encryptedfiles) != 0):
        return self._encryptedfiles
    for row in self.__cursor.execute('SELECT    elementid,elementkey    FROM    content_keys,content    WHERE    volumeid    =    ?    AND    volumeid    =    contentid', (self.volumeid,)):
        self._encryptedfiles[row[0]] = KoboFile(row[0], None, base64.b64decode(row[1]))
    zin = zipfile.ZipFile(self.filename, 'r')
    xmlns = {'ocf': 'urn:oasis:names:tc:opendocument:xmlns:container', 'opf': 'http://www.idpf.org/2007/opf'}
    ocf = ET.fromstring(zin.read('META-INF/container.xml'))
    opffile = ocf.find('.//ocf:rootfile', xmlns).attrib['full-path']
    basedir = re.sub('[^/]+$', '', opffile)
    opf = ET.fromstring(zin.read(opffile))
    zin.close()
    c = re.compile('/')
    for item in opf.findall('.//opf:item', xmlns):
        mimetype = item.attrib['media-type']
        href = item.attrib['href']
        if (not c.match(href)):
            href = string.join((basedir, href), '')
        if (href in self._encryptedfiles):
            self._encryptedfiles[href].mimetype = mimetype
    return self._encryptedfiles
