General Purpose library for Freestanding C++ and POSIX systems
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 

43 rindas
849 B

#include "rc6_generic.hpp"
#include "test_scaffold.h"
#include <iostream>
#include <ios>
struct RC6test : public test_scaffold {
RC6test() {
name = __FILE__ ":1";
}
virtual int run() {
using rc = RC6<>;
rc::key_type key = {0,0,0,0};
rc::block_type plaintext = {0,0,0,0};
rc::block_type expected{0x8fc3a536,0x56b1f778,0xc129df4e,0x9848a41e};
std::cout<<"plain:";
for(auto a : plaintext)
std::cout << std::hex << a;
auto cipher = rc(key);
cipher.encrypt(plaintext);
std::cout<<"\nkey__:";
for(auto a : key)
std::cout << std::hex << a;
std::cout<<"\nciphe:";
for(auto a : plaintext)
std::cout << std::hex << a;
std::cout<<"\nexpec:";
for(auto a : expected)
std::cout << std::hex << a;
std::cout << std::endl;
return plaintext != expected;
}
};
append_test dummy_szfhu5463(new RC6test{});