epub - 如何检查 ePub 文件是否受 DRM 保护?

标签 epub drm

是否有任何编程方法可以安全地检查 epub 文件是否受 DRM 保护(加密)?

我发现 META-INF 目录中可能有一个 rights.xml 和一个 encryption.xml。
这些文件中的任何一个或两个的存在是否意味着内容已加密,如果没有,还有其他方法可以检查吗?
(明确地说,我根本不想阅读带有 DRM 的 ePub,我只想检查它们是否加密。)

最佳答案

FWIW 维基百科 epub 文章指出

When present, DRMed EPUB files must contain a file called rights.xml within the META-INF directory at the root level of the ZIP container.



从 v1.0 开始,epubcheck 被报告通过encryption.xml 的存在检测DRM 保护并报告错误。 epub3 spec

An optional encryption.xml file within the META-INF directory at the root level of the container file system holds all encryption information on the contents of the container. This file is an XML document whose root element is encryption. The encryption element contains child elements of type EncryptedKey and EncryptedData as defined by [XML ENC Core]. Each EncryptedData element describes how one or more files within the container are encrypted. Consequently, if any resource within the container is encrypted, encryption.xml must be present to indicate that the resource is encrypted and provide information on how it is encrypted.



EPUB3 在 rights.xml、它的含义以及它是否是 DRM 文件的强制性内容上含糊不清,因此最好不要依赖它。

关于epub - 如何检查 ePub 文件是否受 DRM 保护?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14442968/

相关文章:

php - 如何在 PHP 中直接将 docx 转换为 ePub?

ios - .epub 上的分页符在 uiwebview iOS 上不起作用

ios - WKWebView 可以播放受 fairplay/drm 保护的视频吗?

javascript - 使用 HTML5 流式传输加密版权内容(音频/视频)

windows - 是否可以渐进式播放 DRMed 轨道

validation - 测试/验证 SCORM 对象?

javascript - 使用 jQuery attr 操作后 Dom 字符串不会改变

c# - 有没有 ePub 的库

javascript - 保护 PhantomJS 脚本免受最终用户的攻击

ios - 如何将文本叠加在正在播放到 Apple TV 的 DRM 视频上?