crypto.h 447 B

123456789101112131415
  1. #ifndef _CRYPTO_H_
  2. #define _CRYPTO_H_
  3. #include "flow.h"
  4. # define n2s(c,s) ((s=(((unsigned int)(c[0]))<< 8)| \
  5. (((unsigned int)(c[1])) )),c+=2)
  6. int extract_parameters(flow *f, uint8_t *hs);
  7. int encrypt(flow *f, uint8_t *input, uint8_t *output, int32_t len, int32_t incoming, int32_t type);
  8. void extract_server_random(flow *f, uint8_t *hs);
  9. int compute_master_secret(flow *f);
  10. #define PRE_MASTER_LEN 256
  11. #endif /* _CRYPTO_H_ */