Function sequoia_ffi::openpgp::fingerprint::pgp_fingerprint_from_hex[][src]

#[no_mangle]
pub extern "C" fn pgp_fingerprint_from_hex(
    hex: *const c_char
) -> Maybe<Fingerprint>
Expand description

Reads a hexadecimal fingerprint.

C Declaration

pgp_fingerprint_t
pgp_fingerprint_from_hex (const char *hex);

Examples

#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <sequoia/openpgp.h>

pgp_fingerprint_t fp =
    pgp_fingerprint_from_hex ("D2F2C5D45BE9FDE6A4EE0AAF31855247603831FD");

char *pretty = pgp_fingerprint_to_string (fp);
assert (strcmp (pretty,
                "D2F2C5D45BE9FDE6A4EE0AAF31855247603831FD") == 0);

free (pretty);
pgp_fingerprint_free (fp);