/* */ #ifndef D_INTERNAL_ARC4_ENCRYPTOR_H #define D_INTERNAL_ARC4_ENCRYPTOR_H #include "common.h" namespace aria2 { class ARC4Encryptor { private: unsigned char state_[256]; unsigned i, j; public: void init(const unsigned char* key, size_t keyLength); // Encrypts data in in buffer to out buffer. in and out can be the // same buffer. void encrypt(size_t len, unsigned char* out, const unsigned char* in); }; } // namespace aria2 #endif // D_INTERNAL_ARC4_ENCRYPTOR_H