crypto.h 504 B

123456789101112131415161718192021
  1. #ifndef _CRYPTO_H_
  2. #define _CRYPTO_H_
  3. #include <stdint.h>
  4. # define n2s(c,s) ((s=(((unsigned int)(c[0]))<< 8)| \
  5. (((unsigned int)(c[1])) )),c+=2)
  6. int PRF(uint8_t *secret, int32_t secret_len,
  7. uint8_t *seed1, int32_t seed1_len,
  8. uint8_t *seed2, int32_t seed2_len,
  9. uint8_t *seed3, int32_t seed3_len,
  10. uint8_t *seed4, int32_t seed4_len,
  11. uint8_t *output, int32_t output_len);
  12. #define PRE_MASTER_LEN 256
  13. #define SSL_MAX_DIGEST 6 //this is from ssl_locl.h
  14. #endif /* _CRYPTO_H_ */