diff options
author | Carl Worth <[email protected]> | 2015-01-19 10:49:41 -0800 |
---|---|---|
committer | Carl Worth <[email protected]> | 2015-01-19 10:53:07 -0800 |
commit | 3b8ccca8a3b5e03829fba7cdb57b49fc10917954 (patch) | |
tree | bc3a4fca37491da6494e0080abee003b3116b99b /src/util/mesa-sha1.h | |
parent | 7a182d233542889ea9e3f8091eaab0a2386f90fc (diff) |
Rename sha1.c and sha1.h to mesa-sha1.c and mesa-sha1.h
The filename of sha1.h was conflicting with the system-provided
sha1.h, (and in some confiurations, our sha1.c was unsuccessfully
attemping to include "sha1.h" and <sha1.h> as two different files).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88523
Diffstat (limited to 'src/util/mesa-sha1.h')
-rw-r--r-- | src/util/mesa-sha1.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/util/mesa-sha1.h b/src/util/mesa-sha1.h new file mode 100644 index 00000000000..1599405cd5a --- /dev/null +++ b/src/util/mesa-sha1.h @@ -0,0 +1,53 @@ +/* Copyright © 2014 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#ifndef SHA1_H +#define SHA1_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include <stdlib.h> + +struct mesa_sha1; + +struct mesa_sha1 * +_mesa_sha1_init(void); + +int +_mesa_sha1_update(struct mesa_sha1 *ctx, const void *data, int size); + +int +_mesa_sha1_final(struct mesa_sha1 *ctx, unsigned char result[20]); + +char * +_mesa_sha1_format(char *buf, const unsigned char *sha1); + +void +_mesa_sha1_compute(const void *data, size_t size, unsigned char result[20]); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif |