Last change
on this file since af09afd was
a4ac9c4,
checked in by GitHub <noreply@…>, at 2023-04-01T20:09:39Z
|
Deprecate sha1_* functions (#172)
- Migrate sha1 calls to direct use of GChecksum
- Mark sha1.h functions as deprecated
|
-
Property mode set to
100644
|
File size:
787 bytes
|
Rev | Line | |
---|
[77bfd07] | 1 | |
---|
| 2 | #ifndef _SHA1_H_ |
---|
| 3 | #define _SHA1_H_ |
---|
| 4 | |
---|
[34afea7] | 5 | #include <glib.h> |
---|
[77bfd07] | 6 | #include <gmodule.h> |
---|
| 7 | |
---|
[a4ac9c4] | 8 | #ifdef __GNUC__ |
---|
| 9 | #define __SHA1_NON_PUBLIC_DEPRECATION__ __attribute__((deprecated("sha1.h will be removed from Bitlbee's public API. Please use another library (such as GLib's gchecksum) instead"))) |
---|
| 10 | #else |
---|
| 11 | #define __SHA1_NON_PUBLIC_DEPRECATION__ |
---|
| 12 | #endif |
---|
| 13 | |
---|
[34afea7] | 14 | #define SHA1_HASH_SIZE 20 |
---|
[77bfd07] | 15 | |
---|
[34afea7] | 16 | typedef GChecksum *sha1_state_t; |
---|
[77bfd07] | 17 | |
---|
[a4ac9c4] | 18 | void sha1_init(sha1_state_t *) __SHA1_NON_PUBLIC_DEPRECATION__; |
---|
| 19 | void sha1_append(sha1_state_t *, const guint8 *, unsigned int) __SHA1_NON_PUBLIC_DEPRECATION__; |
---|
| 20 | void sha1_finish(sha1_state_t *, guint8 digest[SHA1_HASH_SIZE]) __SHA1_NON_PUBLIC_DEPRECATION__; |
---|
| 21 | void sha1_hmac(const char *, size_t, const char *, size_t, guint8 digest[SHA1_HASH_SIZE]) ; |
---|
[34afea7] | 22 | char *sha1_random_uuid(sha1_state_t *); |
---|
[77bfd07] | 23 | |
---|
| 24 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.