]> git.ipfire.org Git - thirdparty/mdadm.git/blame - SHA1.c
Allow autoassembly to choose it's own name for the array.
[thirdparty/mdadm.git] / SHA1.c
CommitLineData
05697ec1
NB
1
2/* Simple wrapper for code in sha1.c, to
3 * provide SHA1() interface as provided by opensll.
4 * I do this because I cannot get SHA1 when staticly linking.
5 *
6 * sha1.c sha1.h md5.h all copied from coreutils-5.94
7 */
8
9#include "sha1.h"
10
11unsigned char *SHA1(unsigned char *buf, int len, unsigned char *dest)
12{
13 static unsigned char defdest[20];
14 if (dest == NULL) dest = defdest;
15
16 return (unsigned char *)sha1_buffer((const char*)buf,
17 len,
18 (void*)dest);
19}