sl_md5.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* sl_md5.h :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: bchanot <bchanot@student.42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2018/09/25 19:20:50 by bchanot #+# #+# */
  9. /* Updated: 2018/10/10 12:56:50 by bchanot ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #ifndef SL_MD5_H
  13. # define SL_MD5_H
  14. typedef struct s_md5
  15. {
  16. t_uint32 buff[16];
  17. t_uint32 state[4];
  18. t_uint64 count;
  19. } t_md5;
  20. typedef struct s_process_md5
  21. {
  22. t_uint32 a;
  23. t_uint32 b;
  24. t_uint32 c;
  25. t_uint32 d;
  26. } t_process_md5;
  27. void sl_md5_final(t_md5 *ctx, t_uint8 *hash);
  28. void sl_md5_update(t_md5 *ctx, const t_uint8 *data, size_t len);
  29. void sl_md5_init(t_md5 *ctx);
  30. #endif