【问题标题】:Testing of AES algorithm implementation in C [closed]在 C 中测试 AES 算法实现 [关闭]
【发布时间】:2013-07-07 21:49:52
【问题描述】:

我已经从site 下载了代码,编译了它,现在尝试测试它,我遇到了一些问题......

我从编译encryptdecrypt生成了两个文件,site的指令是:

加密程序调用如下:

encrypt password cryptofile

它对标准输入进行加密(必要时用空格填充),并将结果写入指定的密码文件。

解密程序调用如下:

decrypt password cryptofile

它解密加密文件的内容并将结果(必要时用空格填充)发送到标准输出。

我没有让这些程序以正确的方式运行......我已经尝试过这些:

./encrypt to_be_encrypted_file password_file encrypted_file
./encrypt to_be_encrypted_string password_string encrypted_file

但我得到的只是提示等待加密文件

中的任何内容和任何更改

【问题讨论】:

    标签: c aes implementation


    【解决方案1】:

    这样称呼它:

    ./encrypt password_string encrypted_file < to_be_encrypted_file 
    

    文档说它加密标准输入

    对于decrypt

    ./decrypt password_string encrypted_file > decrypted_file
    

    因为它说结果是发送到标准输出

    【讨论】:

    • 谢谢,我确实需要加深对这个 C 和 UNIX 世界的了解
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-01-12
    • 2011-04-19
    • 1970-01-01
    • 1970-01-01
    • 2012-03-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多