|
Lines 65-72
sha1_bin (const gchar *bytes,
Link Here
|
| 65 |
|
65 |
|
| 66 |
g_assert (g_checksum_type_get_length (G_CHECKSUM_SHA1) == SHA1_HASH_SIZE); |
66 |
g_assert (g_checksum_type_get_length (G_CHECKSUM_SHA1) == SHA1_HASH_SIZE); |
| 67 |
g_checksum_update (checksum, (const guchar *) bytes, len); |
67 |
g_checksum_update (checksum, (const guchar *) bytes, len); |
| 68 |
g_checksum_get_digest (checksum, out, &len); |
68 |
g_checksum_get_digest (checksum, out, &out_len); |
| 69 |
g_assert (out_len == SHA1_HASH_SIZE); |
69 |
g_assert (out_len == SHA1_HASH_SIZE); |
|
|
70 |
g_checksum_free (checksum); |
| 70 |
} |
71 |
} |
| 71 |
|
72 |
|
| 72 |
static void |
73 |
static void |