1*86d7f5d3SJohn Marino.\" $OpenBSD: md5.9,v 1.1 1996/04/17 21:40:14 mickey Exp $ 2*86d7f5d3SJohn Marino.\" 3*86d7f5d3SJohn Marino.\" Copyright (c) 1996 Michael Shalayeff 4*86d7f5d3SJohn Marino.\" All rights reserved. 5*86d7f5d3SJohn Marino.\" 6*86d7f5d3SJohn Marino.\" Redistribution and use in source and binary forms, with or without 7*86d7f5d3SJohn Marino.\" modification, are permitted provided that the following conditions 8*86d7f5d3SJohn Marino.\" are met: 9*86d7f5d3SJohn Marino.\" 1. Redistributions of source code must retain the above copyright 10*86d7f5d3SJohn Marino.\" notice, this list of conditions and the following disclaimer. 11*86d7f5d3SJohn Marino.\" 2. Redistributions in binary form must reproduce the above copyright 12*86d7f5d3SJohn Marino.\" notice, this list of conditions and the following disclaimer in the 13*86d7f5d3SJohn Marino.\" documentation and/or other materials provided with the distribution. 14*86d7f5d3SJohn Marino.\" 3. All advertising materials mentioning features or use of this software 15*86d7f5d3SJohn Marino.\" must display the following acknowledgement: 16*86d7f5d3SJohn Marino.\" This product includes software developed by Michael Shalayeff 17*86d7f5d3SJohn Marino.\" 3. The name of the author may not be used to endorse or promote products 18*86d7f5d3SJohn Marino.\" derived from this software without specific prior written permission 19*86d7f5d3SJohn Marino.\" 20*86d7f5d3SJohn Marino.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 21*86d7f5d3SJohn Marino.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 22*86d7f5d3SJohn Marino.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 23*86d7f5d3SJohn Marino.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24*86d7f5d3SJohn Marino.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25*86d7f5d3SJohn Marino.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26*86d7f5d3SJohn Marino.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27*86d7f5d3SJohn Marino.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28*86d7f5d3SJohn Marino.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29*86d7f5d3SJohn Marino.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30*86d7f5d3SJohn Marino.\" 31*86d7f5d3SJohn Marino.\" $FreeBSD: src/share/man/man9/MD5.9,v 1.5.2.3 2001/12/17 11:30:18 ru Exp $ 32*86d7f5d3SJohn Marino.\" $DragonFly: src/share/man/man9/MD5.9,v 1.4 2008/05/02 02:05:06 swildner Exp $ 33*86d7f5d3SJohn Marino.\" 34*86d7f5d3SJohn Marino.Dd April 17, 1996 35*86d7f5d3SJohn Marino.Dt MD5 9 36*86d7f5d3SJohn Marino.Os 37*86d7f5d3SJohn Marino.Sh NAME 38*86d7f5d3SJohn Marino.Nm MD5 , 39*86d7f5d3SJohn Marino.Nm MD5Init , 40*86d7f5d3SJohn Marino.Nm MD5Transform 41*86d7f5d3SJohn Marino.Nd message digest routines 42*86d7f5d3SJohn Marino.Sh SYNOPSIS 43*86d7f5d3SJohn Marino.In sys/types.h 44*86d7f5d3SJohn Marino.In sys/md5.h 45*86d7f5d3SJohn Marino.Ft void 46*86d7f5d3SJohn Marino.Fn MD5Init "MD5_CTX *buf" 47*86d7f5d3SJohn Marino.Ft void 48*86d7f5d3SJohn Marino.Fn MD5Transform "u_int32_t buf[4]" "const unsigned char block[64]" 49*86d7f5d3SJohn Marino.Sh DESCRIPTION 50*86d7f5d3SJohn MarinoThe 51*86d7f5d3SJohn Marino.Nm 52*86d7f5d3SJohn Marinomodule implements the RSA Data Security, Inc. MD5 Message-Digest Algorithm 53*86d7f5d3SJohn Marino(MD5). It produces 128-bit MD5 Digest of data. 54*86d7f5d3SJohn Marino.Bl -hang -width MD5Transformxxx 55*86d7f5d3SJohn Marino.It Fn MD5Init 56*86d7f5d3SJohn Marinomust be called just before 57*86d7f5d3SJohn Marino.Fn MD5Transform 58*86d7f5d3SJohn Marinowill be used to produce a digest. 59*86d7f5d3SJohn MarinoThe 60*86d7f5d3SJohn Marino.Fa buf 61*86d7f5d3SJohn Marinoargument is the storage for the digest being produced on subsequent 62*86d7f5d3SJohn Marinocalls to the 63*86d7f5d3SJohn Marino.Fn MD5Transform 64*86d7f5d3SJohn Marinoroutine. 65*86d7f5d3SJohn Marino.It Fn MD5Transform 66*86d7f5d3SJohn Marinois the core of the MD5 algorithm, this alters an existing MD5 hash 67*86d7f5d3SJohn Marinokept in 68*86d7f5d3SJohn Marino.Fa buf 69*86d7f5d3SJohn Marinoto reflect the addition of 64 characters 70*86d7f5d3SJohn Marinoof new data passed in 71*86d7f5d3SJohn Marino.Fa block 72*86d7f5d3SJohn Marinoargument. 73*86d7f5d3SJohn Marino.El 74*86d7f5d3SJohn Marino.Sh COPYRIGHTS 75*86d7f5d3SJohn MarinoThe code for MD5 transform was taken from Colin Plumb's 76*86d7f5d3SJohn Marinoimplementation, which has been placed in the public domain. The 77*86d7f5d3SJohn MarinoMD5 cryptographic checksum was devised by Ronald Rivest, and is 78*86d7f5d3SJohn Marinodocumented in RFC 1321, "The MD5 Message Digest Algorithm". 79