'\" te .\" Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. .TH libmd 3LIB "8 May 2012" "SunOS 5.11" "Interface Libraries" .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 MD4 (RFC1320), MD5 (RFC1321), SHA1 (RFC3174), SHA224 (FIPS 180-2), SHA256 (FIPS 180-2), SHA384 (FIPS 180-2), SHA512 (FIPS 180-2), and SHA512/\fIt\fR (FIPS 180-4) for \fIt\fR = 224 and 256. .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 tab(); lw(2.75i) lw(2.75i) lw(2.75i) lw(2.75i) . \fBMD4Final\fR\fBMD4Init\fR \fBMD4Update\fR\fBmd5_calc\fR \fBMD5Final\fR\fBMD5Init\fR \fBMD5Update\fR\fBSHA1Final\fR \fBSHA1Init\fR\fBSHA1Update\fR \fBSHA224Final\fR\fBSHA224Init\fR \fBSHA224Update\fR\fBSHA256Final\fR \fBSHA256Init\fR\fBSHA256Update\fR \fBSHA2Final\fR\fBSHA2Init\fR \fBSHA2Update\fR\fBSHA384Final\fR \fBSHA384Init\fR\fBSHA384Update\fR \fBSHA512Final\fR\fBSHA512Init\fR \fBSHA512Update\fR .TE .sp .LP The shared object \fBlibmd.so.1\fR also provides these public interfaces that implement variants of SHA-2 and may perform faster on some 64-bit processors: .sp .sp .TS tab(); lw(2.75i) lw(2.75i) lw(2.75i) lw(2.75i) . \fBSHA512_t_Final\fR\fBSHA512_t_Init\fR \fBSHA512_t_Update\fR .TE .sp .LP The digest values produced by the SHA512/224 and SHA512/256 functions are not the same as those digest values produced by the corresponding SHA2 functions. .SH SECURITY .sp .LP The MD4 and MD5 algorithms are currently considered weak for cryptographic use. The algorithms should be used only for compatibility with legacy systems or protocols. .sp .LP The SHA1 algorithm is also believed to have some weaknesses. Migration to one of the SHA2 algorithms\(emincluding SHA224, SHA256, SHA386 or SHA512\(emis highly recommended when compatibility with data formats and on wire protocols is permitted. .SH FILES .sp .ne 2 .mk .na \fB\fB/lib/libmd.so.1\fR\fR .ad .RS 22n .rt shared object .RE .sp .ne 2 .mk .na \fB\fB/lib/64/libmd.so.1\fR\fR .ad .RS 22n .rt 64-bit shared object .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe .TE