encrypt.h 622 B

123456789101112131415161718192021
  1. #ifndef _ENCRYPTION_H_
  2. #define _ENCRYPTION_H_
  3. #include <aes.h>
  4. #include <md5.h>
  5. #include <string.h>
  6. #include <stdint.h>
  7. #include <stdlib.h>
  8. #include <stdio.h>
  9. int my_encrypt(const char *data,char *output,int &len,char * key);
  10. int my_decrypt(const char *data,char *output,int &len,char * key);
  11. int my_encrypt_pesudo_header(uint8_t *data,uint8_t *output,int &len,uint8_t * key,uint8_t *header,int hlen);
  12. int my_decrypt_pesudo_header(uint8_t *data,uint8_t *output,int &len,uint8_t * key,uint8_t *header,int hlen);
  13. const int auth_none=0;
  14. const int auth_md5=1;
  15. const int cipher_none=0;
  16. const int cipher_aes128cbc=1;
  17. #endif