在objective-c / iphone中读取128位加密的word 2007文件

发布于 2024-10-04 01:54:07 字数 103 浏览 0 评论 0原文

我想使用 Objective-C 阅读一个 128 位加密的 word 2007 docx 文件,我知道我应该遵循的方式。

是否可以解密该文件,如果可以,我如何读取 docx?

I want to read a word 2007 docx file which is 128-bit encrypted, using objective-c and i have any idea the way I should follow.

Is it possible decrypting the file and if it is, how can I read the docx?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

路弥 2024-10-11 01:54:07

这可能更像是一个客观的 C 问题,而不是一个文字问题。

Word DOCX 文件本质上只是具有 DOCX 扩展名的 ZIP 存档。

保存 DOCX 文件,为其设置密码,然后将 DOCX 文件重命名为 ZIP,如果您有密码,您应该能够使用任何旧的 zip 管理器打开它。我敢打赌,objective-c zip 存档处理代码在某处被剪掉了。

至于关于阅读 docx 的第二个问题,

嗯,一旦你打开了 zip 并未加密,zip 就是一堆文件的 zip 存档。这些文件描述了 docx 文件的各个元素。

开始了解规范

您可以从 wikipedia 文章http://en.wikipedia.org/wiki/Office_Open_XML

但实际上,只需将 docx 重命名为 zip,将其解压缩到某处,然后就可以开始探索了。

大多数内容都是 XML 文件,可以通过多种不同的方式读取(DOM、SAX、纯行输入等)。

This is probably more an objective C question than a word question.

Word DOCX files are essentially just ZIP archives that have a DOCX extension.

Save a DOCX file, give it a password, then rename the DOCX file as a ZIP, and you should be able to open it with any old zip manager, provided you have the password. I'm betting there are objective-c zip archive handling code snips out there somewhere.

As for the second question about reading the docx,

Well, once you have the zip opened and unencrypted, the zip is just that, a zip archive of a bunch of files. The files depict individual elements of the docx file.

You can get a start on the specs from the wikipedia article

http://en.wikipedia.org/wiki/Office_Open_XML

But really, just rename a docx as zip, unzip it somewhere and this start poking around.

Most of the contents are XML files, that can be read in a variety of different ways (DOM, SAX, plain ol' line input, etc).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文