md5
TOC »
Documentation
Computes MD5 checksums
See message-digest-primitive for more information.
MD5 API
Component export
Usage
(use md5-api)
Constants
- name
- algorithm name ; symbol
- version
- algorithm version ; string
- context-size
- context byte length ; fixnum
- digest-length
- final byte length ; fixnum
- block-length
- buffer byte length ; fixnum
Note that block-length is informational only.
init
- init CTXprocedure
Initializes a MD5 CTX, with at least context-size byte size.
update
- update CTX OBJ LENprocedure
Accumulate LEN bytes from the Scheme OBJ into CTX.
raw-update
- raw-update CTX PTR LENprocedure
Accumulate LEN bytes from the byte PTR into CTX.
final
- 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.
MD5 Primitive
Packaged export
Usage
(use md5-primitive)
md5-primitive
- md5-primitiveprocedure
Returns the 128-bit checksum digest primitive object.
Usage
(import md5)
Examples
- Note the message-digest-utils egg is a dependency for the example.
(import md5 message-digest-byte-vector) (message-digest-string (md5-primitive) "abc") ;=> "900150983cd24fb0d6963f7d28e17f72"
Notes
- The ...-primitive API is for use with the message-digest extensions. And the ...-api API implements the ...-primitive API. One packages the algorithm as a record, the other a module.
Requirements
Author
Colin Plumb, wrapped for Chicken by Peter Bex, C5 by kon lovett
Repository
This egg is hosted on the CHICKEN Subversion repository:
https://anonymous@code.call-cc.org/svn/chicken-eggs/release/5/md5
If you want to check out the source code repository of this egg and you are not familiar with Subversion, see this page.
Version history
- 4.1.0
- Split into api & primitive modules.
- 4.0.0
- CHICKEN 5 release.
- 3.2.0
- Add raw-update. Kon Lovett
- 3.1.0
- Add block-length. Kon Lovett
- 3.0.0
- Remove deprecated procedures. Kon Lovett
- 2.5
- 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)
- 2.4
- Change deprecated pointer foreign type specifier to scheme-pointer to make it work under chickens newer than 4.6.0.
- 2.3
- Do not define uint32 as uint32_t but use it directly to avoid conflicts with system-defined types on some OSes.
- 2.2
- a message-digest-primitive has no "state". Kon Lovett
- 2.1
- Fixed typo in setup file that caused the extension to get installed under the name "m5"
- 2.0
- Chicken 4 implementation. Replaced GPL code with common public domain code.
- 1.1
- Added dependency on message-digest egg
- 1.0
- Initial release
License
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.