Source:NetHack 5.0.0/include/nhmd4.h
Jump to navigation
Jump to search
Below is the full text to nhmd4.h from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/include/nhmd4.h#line12]], for example.
The NetHack General Public License applies to screenshots, source code and other content from NetHack.
This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.
1. /* NetHack 5.0 nhmd4.h $NHDT-Date: 1708811386 2024/02/24 21:49:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.0 $ */ 2. /*- Copyright (c) Kenneth Lorber, Kensington, Maryland, 2024 */ 3. /* NetHack may be freely redistributed. See license for details. */ 4. 5. // Derived from: 6. /* 7. * This is an OpenSSL-compatible implementation of the RSA Data Security, 8. * Inc. MD4 Message-Digest Algorithm. 9. * 10. * Written by Solar Designer <solar@openwall.com> in 2001, and placed in 11. * the public domain. See md4.c for more information. 12. */ 13. 14. #ifndef NHMD4_H 15. #define NHMD4_H 16. 17. #define NHMD4_DIGEST_LENGTH 128 18. #define NHMD4_RESULTLEN (128 / 8) /* 16 */ 19. 20. typedef uint32_t quint32; 21. 22. struct nhmd4_context { 23. quint32 lo, hi; 24. quint32 a, b, c, d; 25. unsigned char buffer[64]; 26. quint32 block[NHMD4_RESULTLEN]; 27. }; 28. typedef struct nhmd4_context NHMD4_CTX; 29. 30. extern void nhmd4_init(NHMD4_CTX *ctx); 31. extern void nhmd4_update(NHMD4_CTX *, const unsigned char *, size_t); 32. extern void nhmd4_final(NHMD4_CTX *, unsigned char result[NHMD4_RESULTLEN]); 33. 34. #endif /* NHMD4_H */ 35. 36. /*nhmd4.h*/ 37.