diff options
| author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-11 23:36:49 +0100 |
|---|---|---|
| committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-11 23:36:49 +0100 |
| commit | 93f7a91a954e813391a499d0b006d71c0d854a4d (patch) | |
| tree | 902735c4660c861b14b7c2ed753782167e07d487 /src/input/sha1.h | |
| parent | c43b67f1267ee6b4ea6198db3c1af7d76632a5b4 (diff) | |
| download | xine-lib-93f7a91a954e813391a499d0b006d71c0d854a4d.tar.gz xine-lib-93f7a91a954e813391a499d0b006d71c0d854a4d.tar.bz2 | |
Use libavutil's sha1 routine rather than adding an implementation of it.
Diffstat (limited to 'src/input/sha1.h')
| -rw-r--r-- | src/input/sha1.h | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/src/input/sha1.h b/src/input/sha1.h deleted file mode 100644 index 9f2659d60..000000000 --- a/src/input/sha1.h +++ /dev/null @@ -1,60 +0,0 @@ -/* NIST Secure Hash Algorithm */ -/* heavily modified by Uwe Hollerbach <uh@alumni.caltech edu> */ -/* from Peter C. Gutmann's implementation as found in */ -/* Applied Cryptography by Bruce Schneier */ -/* This code is in the public domain */ - -#ifndef SHA_H -#define SHA_H - -#include <stdlib.h> -#include <stdio.h> - -/* Useful defines & typedefs */ -typedef unsigned char SHA_BYTE; /* 8-bit quantity */ -typedef unsigned long SHA_LONG; /* 32-or-more-bit quantity */ - -#define SHA_BLOCKSIZE 64 -#define SHA_DIGESTSIZE 20 - -typedef struct { - SHA_LONG digest[5]; /* message digest */ - SHA_LONG count_lo, count_hi; /* 64-bit bit count */ - SHA_BYTE data[SHA_BLOCKSIZE]; /* SHA data buffer */ - int local; /* unprocessed amount in data */ -} SHA_INFO; - -void sha_init(SHA_INFO *); -void sha_update(SHA_INFO *, SHA_BYTE *, int); -void sha_final(unsigned char [20], SHA_INFO *); - -void sha_stream(unsigned char [20], SHA_INFO *, FILE *); -void sha_print(unsigned char [20]); -char *sha_version(void); - -#define SHA_VERSION 1 - -#ifdef HAVE_CONFIG_H -#include "config.h" - -#ifdef WORDS_BIGENDIAN -# if SIZEOF_LONG == 4 -# define SHA_BYTE_ORDER 4321 -# elif SIZEOF_LONG == 8 -# define SHA_BYTE_ORDER 87654321 -# endif -#else -# if SIZEOF_LONG == 4 -# define SHA_BYTE_ORDER 1234 -# elif SIZEOF_LONG == 8 -# define SHA_BYTE_ORDER 12345678 -# endif -#endif - -#else - -#define SHA_BYTE_ORDER 1234 - -#endif - -#endif /* SHA_H */ |
