Computes MD5 checksums
See message-digest-primitive for more information.
- algorithm name ; symbol
- algorithm version ; string
- context byte length ; fixnum
- final byte length ; fixnum
- buffer byte length ; fixnum
Note that block-length is informational only.
- init CTXprocedure
Initializes a MD5 CTX, with at least context-size byte size.
- update CTX OBJ LENprocedure
Accumulate LEN bytes from the Scheme OBJ into CTX.
- raw-update CTX PTR LENprocedure
Accumulate LEN bytes from the byte PTR into CTX.
- final CTX OBJprocedure
Finalize the CTX into a Scheme OBJ with at least digest-length byte size. The target is usually a blob, u8vector, or string.
Returns the 128-bit checksum digest primitive object.
(import md5 message-digest-byte-vector) (message-digest-string (md5-primitive) "abc") ;=> "900150983cd24fb0d6963f7d28e17f72"
This egg is hosted on the CHICKEN Subversion repository:
If you want to check out the source code repository of this egg and you are not familiar with Subversion, see this page.
- Split into api & primitive modules.
- CHICKEN 5 release.
- Add raw-update. Kon Lovett
- Add block-length. Kon Lovett
- Remove deprecated procedures. Kon Lovett
- Make function declarations static in order to avoid conflicts with those from libc if the OS supplies them. This makes MD5 work on OpenBSD (thanks to Alan Post and Christian Kellermann)
- Change deprecated pointer foreign type specifier to scheme-pointer to make it work under chickens newer than 4.6.0.
- Do not define uint32 as uint32_t but use it directly to avoid conflicts with system-defined types on some OSes.
- a message-digest-primitive has no "state". Kon Lovett
- Fixed typo in setup file that caused the extension to get installed under the name "m5"
- Chicken 4 implementation. Replaced GPL code with common public domain code.
- Added dependency on message-digest egg
- Initial release
This code implements the MD5 message-digest algorithm. The algorithm is due to Ron Rivest. This code was written by Colin Plumb in 1993, no copyright is claimed. This code is in the public domain; do with it what you wish.
Equivalent code is available from RSA Data Security, Inc. This code has been tested against that, and is equivalent, except that you don't need to include two pages of legalese with every copy.