ChipMaster's trial hacks on C++CMS starting with v1.2.1. Not sure I'll follow on with the v2 since it looks to be breaking and mostly frivolous.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

23 lines
508 B

  1. #ifndef CPPCMS_HMAC_ENCRYPTOR_H
  2. #define CPPCMS_HMAC_ENCRYPTOR_H
  3. #include "base_encryptor.h"
  4. namespace cppcms {
  5. namespace sessions {
  6. namespace impl {
  7. class hmac_cipher : public base_encryptor {
  8. void hash(unsigned char const *,size_t,unsigned char md5[16]);
  9. public:
  10. virtual std::string encrypt(std::string const &plain,time_t timeout);
  11. virtual bool decrypt(std::string const &cipher,std::string &plain,time_t *timeout=NULL);
  12. hmac_cipher(std::string key);
  13. };
  14. } // impl
  15. } // sessions
  16. } // cppcms
  17. #endif