/* */ #ifndef D_LIBGCRYPT_ARC4_ENCRYPTOR_H #define D_LIBGCRYPT_ARC4_ENCRYPTOR_H #include "common.h" #include #include namespace aria2 { class ARC4Encryptor { private: gcry_cipher_hd_t hdl_; public: ARC4Encryptor(); ~ARC4Encryptor(); 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_LIBGCRYPT_ARC4_ENCRYPTOR_H