'\" te
.\" Copyright (c) 2008, Sun Microsystems, Inc.  All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH LIBMD 3LIB "Jun 16, 2008"
.SH NAME
libmd \- Message Digest library
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmd\fR [ \fIlibrary\fR... ]
#include <\fBmd4.h\fR>
#include <\fBmd5.h\fR>
#include <\fBsha1.h\fR>
#include <\fBsha2.h\fR>
.fi

.SH DESCRIPTION
.sp
.LP
Functions in this library provide hashing routines for \fBMD4 (RFC1320)\fR,
\fBMD5 (RFC1321)\fR, \fBSHA1 (RFC3174)\fR, \fBSHA256 (FIPS 180-2)\fR, \fBSHA384
(FIPS 180-2)\fR, \fBSHA512 (FIPS 180-2)\fR.
.SH INTERFACES
.sp
.LP
The shared object \fBlibmd.so.1\fR provides the public interfaces defined
below. See \fBIntro\fR(3) for additional information on shared object
interfaces.
.sp

.sp
.TS
l l
l l .
\fBMD4Final\fR	\fBMD4Init\fR
\fBMD4Update\fR	\fBmd5_calc\fR
\fBMD5Final\fR	\fBMD5Init\fR
\fBMD5Update\fR	\fBSHA1Final\fR
\fBSHA1Init\fR	\fBSHA1Update\fR
\fBSHA2Final\fR	\fBSHA2Init\fR
\fBSHA2Update\fR	
.TE

.SH SECURITY
.sp
.LP
The \fBMD4\fR and \fBMD5\fR algorithms are currently considered weak for
cryptographic use. The algorithms should be used only for compatibility with
legacy systems or protocols.
.sp
.LP
The \fBSHA1\fR algorithm is also believed to have some weaknesses. Migration to
one of the \fBSHA2\fR algorithms-including \fBSHA256\fR, \fBSHA386\fR or
\fBSHA512\fR-is highly recommended when compatibility with data formats and on
wire protocols is permitted.
.SH FILES
.sp
.ne 2
.na
\fB\fB/lib/libmd.so.1\fR\fR
.ad
.RS 22n
shared object
.RE

.sp
.ne 2
.na
\fB\fB/lib/64/libmd.so.1\fR\fR
.ad
.RS 22n
64-bit shared object
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Committed
_
MT-Level	MT-Safe
.TE