我需要一个小的,如两个拼接版本的AES加密。我GOOGLE搜索AES - Advanced Encryption Standard(源代码),但代码似乎是为Windows编写的,我需要一个多平台。AES加密quellcode
是否有任何其他已知的AES加密小版本或在Linux上似乎未知的使用函数的修复?
我的编译器说,这些都是未知的功能:
./aes/AES.cpp:198:17: error: ‘_rotl’ was not declared in this scope
./aes/AES.cpp:608:20: error: ‘_rotr’ was not declared in this scope
我也得到:
./aes/AES.cpp:764:34: error: ‘memset’ was not declared in this scope
./aes/AES.cpp:770:36: error: ‘memcpy’ was not declared in this scope
由于这些应该是已知的,考虑这些包括:
#include "AES.hpp"
#include <assert.h>
#include <stdio.h>
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <iostream>
你需要包含''来获得'memset'和'memcpy'。 –
avakar
您只需用C代码或适合您的平台的替换替换旋转内在函数。 –
**首先解决密钥管理问题**:http://blogs.msdn.com/b/ericlippert/archive/2011/09/27/keep-it-secret-keep-it-safe.aspx –