| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
@deftypefun {int} {gnutls_fingerprint} (gnutls_digest_algorithm_t @var{algo}, const gnutls_datum_t * @var{data}, void * @var{result}, size_t * @var{result_size}) |
| 6 |
@var{algo}: is a digest algorithm |
| 7 |
|
| 8 |
@var{data}: is the data |
| 9 |
|
| 10 |
@var{result}: is the place where the result will be copied (may be null). |
| 11 |
|
| 12 |
@var{result_size}: should hold the size of the result. The actual size |
| 13 |
of the returned result will also be copied there. |
| 14 |
|
| 15 |
This function will calculate a fingerprint (actually a hash), of |
| 16 |
the given data. The result is not printable data. You should |
| 17 |
convert it to hex, or to something else printable. |
| 18 |
|
| 19 |
This is the usual way to calculate a fingerprint of an X.509 DER |
| 20 |
encoded certificate. Note however that the fingerprint of an |
| 21 |
OpenPGP certificate is not just a hash and cannot be calculated with this |
| 22 |
function. |
| 23 |
|
| 24 |
@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise |
| 25 |
an error code is returned. |
| 26 |
@end deftypefun |