mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
b9cbedfb59
Original commit message from CVS: * Makefile.am: Add check-exports target and run it with 'make check'. * configure.ac: Be stricter about what we export in our libraries: change regexp so that we only export _gst_foo(), but not __gst_foo(). * gst-libs/gst/cdda/base64.h: (rfc822_binary): * gst-libs/gst/cdda/sha1.h: (sha_init), (sha_update), (sha_final): Change internal functions to __gst_foo so they dont' get exported. * win32/common/libgstaudio.def: Add missing symbols.
62 lines
1.4 KiB
C
62 lines
1.4 KiB
C
/* 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 */
|
|
/* $Id$ */
|
|
|
|
#ifndef __GST_CDDA_SHA_H__
|
|
#define __GST_CDDA_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;
|
|
|
|
#define sha_init __gst_cdda_sha_init
|
|
#define sha_update __gst_cdda_sha_update
|
|
#define sha_final __gst_cdda_sha_final
|
|
|
|
void sha_init(SHA_INFO *);
|
|
void sha_update(SHA_INFO *, SHA_BYTE *, int);
|
|
void sha_final(unsigned char [20], SHA_INFO *);
|
|
|
|
#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 /* __GST_CDDA_SHA_H__ */
|