/* */ #include "LibnettleARC4Encryptor.h" #include namespace aria2 { ARC4Encryptor::ARC4Encryptor() {} ARC4Encryptor::~ARC4Encryptor() {} void ARC4Encryptor::init(const unsigned char* key, size_t keyLength) { ctx_.init(key, keyLength); } void ARC4Encryptor::encrypt(unsigned char* out, size_t outLength, const unsigned char* in, size_t inLength) { assert(outLength == inLength); arcfour_crypt(ctx_.getCipherContext(), outLength, out, in); } } // namespace aria2