使用OpenSSL的命令PHP服务器上的文件解密 [英] Decryption of a file on php server using openssl commands

查看:197
本文介绍了使用OpenSSL的命令PHP服务器上的文件解密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在加密客户端的文件,并尝试使用OpenSSL的命令,它创建的输出文件但0字节大小解密我的Linux服务器上。

I am encrypting a file on client side and trying to decrypt it on my linux server using openssl command, its creating output file but with 0 bytes size.

在code我使用的PHP用于解密文件是:

The code I am using in php for decrypting file is:

系统(OpenSSL的ENC -d -AES-192-ECB -in secure.cxf退房手续plain.xml -K 11223344556677889900aabbccddeeff0011223344556677);

在这里我ECB模式使用AES 192位(24字节)键,

here I am using AES in ECB mode with 192 bit (24 byte) key,

其中,

secure.cxf 在同一文件夹与php文件输入文件

secure.cxf is input file in same folder with php file

plain.xml 输出文件带有0字节

11223344556677889900aabbccddeeff0011223344556677 是我的解密私钥

我尝试了不同的Linux系统中抗工相同的openssl命令时,命令工作正常,但在服务器上它使空的输出文件。任何想法如何解决空文件的问题?
有没有替代的方式来对文件做同样的解密(AES,ECB模式,192位密钥)PHP的服务器上?

I have tried the same openssl command on different linux operationg systems, the command works fine but on server it makes empty output file. Any idea how to resolve the empty file problem? Is there any alternative way to do same decryption (AES, ECB mode, 192 bit key) for files on php server?

先谢谢了。

推荐答案

我使用PHP的另一种方式解决了我的问题解密。如果有人找同一遵循这个。

I resolved my problem for decryption by another way using php. If anybody looking for same follow this.

<一个href=\"http://stackoverflow.com/questions/5550300/aes-192-encryption-decryption-using-php#comment-20621577\">AES -192加密使用PHP /解密?

这篇关于使用OpenSSL的命令PHP服务器上的文件解密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆