#include "common.h"
Go to the source code of this file.
Functions | |
| gboolean | parse_base32_sha1 (const gchar *buf, size_t size, struct sha1 *sha1) |
| Validate SHA1 starting in NUL-terminated `buf' as a proper base32 encoding of a SHA1 hash, and write decoded value in `retval'. | |
| gboolean | urn_get_sha1 (const gchar *buf, struct sha1 *sha1) |
| Locate the start of "urn:sha1:" or "urn:bitprint:" indications and extract the SHA1 out of it, placing it in the supplied `digest' buffer. | |
| gboolean | urn_get_sha1_no_prefix (const gchar *buf, struct sha1 *sha1) |
| This is the same as urn_get_sha1(), only the leading "urn:" part is missing (typically a URN embedded in a GGEP "u"). | |
| gboolean | urn_get_bitprint (const gchar *buf, size_t size, struct sha1 *sha1, struct tth *tth) |
| gboolean | urn_get_tth (const gchar *buf, size_t size, struct tth *tth) |
|
||||||||||||||||
|
Validate SHA1 starting in NUL-terminated `buf' as a proper base32 encoding of a SHA1 hash, and write decoded value in `retval'. The SHA1 typically comes from HTTP, in a X-Gnutella-Content-URN header.
|
|
||||||||||||||||||||
|
|
|
||||||||||||
|
Locate the start of "urn:sha1:" or "urn:bitprint:" indications and extract the SHA1 out of it, placing it in the supplied `digest' buffer.
|
|
||||||||||||
|
This is the same as urn_get_sha1(), only the leading "urn:" part is missing (typically a URN embedded in a GGEP "u"). `buf' MUST start with "sha1:" or "bitprint:" indications. Since the leading "urn:" part is missing, we cannot be lenient. Extract the SHA1 out of it, placing it in the supplied `digest' buffer.
|
|
||||||||||||||||
|
|
1.3.9.1