7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin/***********************************************************************
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin* This software is part of the ast package *
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner* Copyright (c) 1996-2010 AT&T Intellectual Property *
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin* and is licensed under the *
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin* Common Public License, Version 1.0 *
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin* by AT&T Intellectual Property *
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin* A copy of the License is available at *
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin* Information and Software Systems Research *
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin* AT&T Research *
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin* Florham Park NJ *
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin* Glenn Fowler <gsf@research.att.com> *
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin***********************************************************************/
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * sum(3) wrapper for solaris -lmd message digest library
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chintypedef void (*Lmd_update_f)(void*, const void*, size_t);
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chintypedef void (*Lmd_final_f)(unsigned char*, void*);
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin unsigned int datasize; \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin register int i;
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinlmd_print(Sum_t* p, Sfio_t* sp, register int flags, size_t scale)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin register unsigned char* d;
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin register int i;
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin d = (flags & SUM_TOTAL) ? lmd->total : lmd->data;
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define md4_description "RFC1320 MD4 message digest. Cryptographically weak. The block count is not printed."
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define md4_options "[+(version)?md4 (solaris -lmd) 2005-07-26]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinmd4_open(const Method_t* method, const char* name)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define md5_description "RFC1321 MD5 message digest. Cryptographically weak. The block count is not printed."
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define md5_options "[+(version)?md5 (solaris -lmd) 2005-07-26]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinmd5_open(const Method_t* method, const char* name)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define sha1_description "RFC3174 / FIPS 180-1 SHA-1 secure hash algorithm 1. Cryptographically weak. The block count is not printed."
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define sha1_options "[+(version)?sha1 (solaris -lmd) 2005-07-26]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin unsigned char pad[1024]; /* XXX: who's bug is it? */
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinsha1_open(const Method_t* method, const char* name)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define sha256_description "FIPS 180-2 SHA256 secure hash algorithm. The block count is not printed."
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define sha256_options "[+(version)?sha256 (solaris -lmd) 2005-07-26]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define sha256_match "sha256|sha-256|SHA256|SHA-256"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinsha256_open(const Method_t* method, const char* name)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define sha384_description "FIPS 180-2 SHA384 secure hash algorithm. The block count is not printed."
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define sha384_options "[+(version)?sha384 (solaris -lmd) 2005-07-26]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define sha384_match "sha384|sha-384|SHA384|SHA-384"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinsha384_open(const Method_t* method, const char* name)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define sha512_description "FIPS 180-2 SHA512 secure hash algorithm. The block count is not printed."
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define sha512_options "[+(version)?sha512 (solaris -lmd) 2005-07-26]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#define sha512_match "sha512|sha-512|SHA512|SHA-512"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinsha512_open(const Method_t* method, const char* name)