用C AES算法实现的测试 [英] Testing of AES algorithm implementation in C
问题描述
我已经从这个网站下载code,编译它,现在想测试一下我有几个问题...
I've downloaded the code from this site, compiled it and now trying to test it I got a few problems...
我从编译生成两个文件的 加密
和 解密
并从网站说明是:
I generated two files from compilation encrypt
and decrypt
and instructions from the site are:
加密程序被称为如下:
加密密码cryptofile
encrypt password cryptofile
据加密标准输入(用空格填充它,如果需要的话),并将结果写入到指定cryptofile。
It encrypts the standard input (padding it with spaces, if necessary), and writes the result to the specified cryptofile.
解密程序被称为如下:
解密密码cryptofile
decrypt password cryptofile
据解密cryptofile内容并将结果(用空格填充,如果需要的话)到标准输出。
It decrypts the cryptofile contents and sends the result (padded with spaces, if necessary) to the standard output.
我没有得到这个工作方案正确的方式......我已经试过这些:
I'm not getting this programs working the right way... I've tried these:
./加密to_be_encrypted_file PASSWORD_FILE encrypted_file
结果 ./加密to_be_encrypted_string password_string encrypted_file
但是,所有我得到的是提示等待什么,在的加密文件的任何修改的
But all I'm getting is the prompt waiting for anything and any change in the encrypted file
推荐答案
这样称呼它:
./encrypt password_string encrypted_file < to_be_encrypted_file
文档说的它加密标准输入的
和对解密
:
./decrypt password_string encrypted_file > decrypted_file
因为它说的结果是送的标准输出的
这篇关于用C AES算法实现的测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!