php mcrypt - 解密和加密文件?
我一直在寻找一个允许对 pgp 加密的 csv 文件进行解密/加密的 php 类。我发现的所有内容都主要针对密码。我假设原理本质上是相同的,但想知道这里是否有人可以向我指出一个专门用于通过 FTP 接收文件并解密它们,以及加密文件并将它们传输到其他地方的类的方向?这是我第一次涉足加密领域,所以希望有人能给我指出一些有用的东西?我会继续谷歌搜索,但真的很感激一些指点......
I've been looking around for a php class that allows the decryption / encryption of pgp-encrypted csv files. Everything I've found has been primarily geared towards passwords. I'm assuming the principles are essentially the same, but was wondering if someone here can point me in the direction of a class specifically intended to receive files via FTP and decrypt them, as well as encrypt files and FTP them elsewhere? It's my first foray into encryption, so hoping that someone can point me to something useful? I'll keep googling, but would really appreciate some finger-pointing...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
mcrypt 不是为处理 PGP 加密的文件而设计的。最好使用 GnuPG 。
mcrypt isn't designed for handling PGP-encrypted files. Best to use GnuPG for them.
对于 PGP 部分,为什么不直接通过管道传输到 gpg。如果您甚至可以找到一个类来执行此操作,则尝试在 PHP 中执行加密和其他相关任务将会非常慢。
For the PGP portion, why not just pipe to gpg. Trying to do the encryption and other related tasks in PHP is going to be quite slow, if you can even find a class to do it.