Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
[[tags: egg]] == md5 [[toc:]] == Documentation Computes MD5 checksums See [[message-digest-primitive]] for more information. === MD5 API Component export ==== Usage <enscript language=scheme> (use md5-api) </enscript> ==== 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 <procedure>(init CTX)</procedure> Initializes a MD5 {{CTX}}, with at least {{context-size}} byte size. ==== update <procedure>(update CTX OBJ LEN)</procedure> Accumulate {{LEN}} bytes from the Scheme {{OBJ}} into {{CTX}}. ==== raw-update <procedure>(raw-update CTX PTR LEN)</procedure> Accumulate {{LEN}} bytes from the byte {{PTR}} into {{CTX}}. ==== final <procedure>(final CTX OBJ)</procedure> 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 <enscript language=scheme> (use md5-primitive) </enscript> ==== md5-primitive <procedure>(md5-primitive) -> message-digest-primitive</procedure> Returns the 128-bit checksum digest primitive object. == Usage <enscript language=scheme> (import md5) </enscript> == Examples * '''Note''' the {{message-digest-utils}} egg is a dependency for the example. <enscript highlight="scheme"> (import md5 message-digest-byte-vector) (message-digest-string (md5-primitive) "abc") ;=> "900150983cd24fb0d6963f7d28e17f72" </enscript> == 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 [[message-digest-primitive|message-digest-primitive]] == Author Colin Plumb, wrapped for Chicken by [[/users/peter-bex|Peter Bex]], C5 by [[Kon Lovett|kon lovett]] == Repository This egg is hosted on the CHICKEN Subversion repository: [[https://anonymous@code.call-cc.org/svn/chicken-eggs/release/5/md5|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 [[/egg-svn-checkout|this page]]. == Version history ; 4.1.0 : Split into api & primitive modules. ; 4.0.0 : CHICKEN 5 release. ; 3.2.0 : Add raw-update. [[/users/kon-lovett|Kon Lovett]] ; 3.1.0 : Add block-length. [[/users/kon-lovett|Kon Lovett]] ; 3.0.0 : Remove deprecated procedures. [[/users/kon-lovett|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". [[/users/kon-lovett|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.
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you add 2 to 16?