snefrufile(3)

NAME
snefrufile - apply the Xerox Secure Hash Function to a stream

SYNTAX
#include <snefrufile.h> void snefrufile_clear(s);
void snefrufile_add(s,c);
void snefrufile_addn(m,b,len);
void snefrufile_hash(s,h); snefrufile *s;
unsigned char c;
unsigned char h[SNEFRUFILE_HASHLEN];
unsigned char *b;
int len;

DESCRIPTION
snefrufile provides a standard way to apply Merkle's Snefru-8 hash function to a stream of unsigned characters. s points to a snefrufile structure, which accumulates the hash as data is fed in. Before feeding in any data you must call snefrufile_clear(s). Then, for each unsigned character c from the stream, call snefrufile_add(s,c). To process an array b of len unsigned characters, call snefrufile_addn(m,b,len). This is faster than calling snefrufile_add on each character in turn. snefrufile_hash(s,h) places the resulting hash into h, an array of bytes of length SNEFRUFILE_HASHLEN. You may not use s after that without again calling snefrufile_clear(s). SNEFRUFILE_HASHLEN equals 32.

COMPATIBILITY
The snefrufile library was designed for compatibility with Merkle's original snefru utility.

VERSION
snefrufile 0.95, 8 July 1993.

AUTHOR
Placed into the public domain by Daniel J. Bernstein. snefrufile is simply a wrapper around snefru512, which is derived from the Xerox Secure Hash Function.

SEE ALSO
snefru(1), snefru512(3)