@c Generated by the sb-manual contrib. Do not edit.

@node sb md5
@section sb-md5

The @code{sb-md5} module implements the RFC1321 MD5 Message Digest
Algorithm.

@anchor{Function sb-md5 md5sum-file}
@ffindex @sortas{md5sum-file sb-md5} md5sum-file [sb-md5]
@deffn{Function} sb-md5:md5sum-file pathname
Calculate the MD5 message-digest of the file specified by @code{pathname}.
@end deffn
@anchor{Function sb-md5 md5sum-sequence}
@ffindex @sortas{md5sum-sequence sb-md5} md5sum-sequence [sb-md5]
@deffn{Function} sb-md5:md5sum-sequence sequence &key start end
Calculate the MD5 message-digest of data in @code{sequence}, which should
be a 1d @code{simple-array} with element type (@code{unsigned-byte} 8). On CMU CL
and SBCL non-simple and non-1d arrays with this element-type are also
supported.
@end deffn
@anchor{Function sb-md5 md5sum-stream}
@ffindex @sortas{md5sum-stream sb-md5} md5sum-stream [sb-md5]
@deffn{Function} sb-md5:md5sum-stream stream
Calculate an MD5 message-digest of the contents of @code{stream}.  Its
element-type has to be (@code{unsigned-byte} 8). Use on character streams is
DEPRECATED, as this will not work correctly on implementations with
@code{char-code-limit} > 256 and ignores character coding issues.
@end deffn
@anchor{Function sb-md5 md5sum-string}
@ffindex @sortas{md5sum-string sb-md5} md5sum-string [sb-md5]
@deffn{Function} sb-md5:md5sum-string string &key external-format start end
Calculate the MD5 message-digest of the binary representation of
@code{string} (as octets) in the external format specified by
@code{external-format}. The boundaries @code{start} and @code{end} refer to character
positions in the string, not to octets in the resulting binary
representation.  The permissible external format specifiers are
determined by the underlying implementation.
@end deffn
The implementation for CMUCL was largely done by Pierre Mai, with help
from members of the @code{cmucl-help} mailing list. Since CMUCL and SBCL
are similar in many respects, it was not too difficult to extend the
low-level implementation optimizations for CMUCL to SBCL. Following
this, SBCL's compiler was extended to implement efficient
compilation of modular arithmetic (@ref{modular arithmetic}), which
enabled the implementation to be expressed in portable arithmetical
terms, apart from the use of @ref{sb rotate byte} for bitwise rotation.

