blob: 11d9decf52843c5def9de1a4cd7fbb32c71309d6 [file] [log] [blame]
Jeff Thompson8238d002013-07-10 11:56:49 -07001/**
Jeff Thompson7687dc02013-09-13 11:54:07 -07002 * Copyright (C) 2013 Regents of the University of California.
3 * @author: Jeff Thompson <jefft0@remap.ucla.edu>
Jeff Thompson8238d002013-07-10 11:56:49 -07004 * See COPYING for copyright and distribution information.
5 */
6
7#ifndef NDN_PUBLISHERPUBLICKEYDIGEST_H
Jeff Thompson2d27e2f2013-08-09 12:55:00 -07008#define NDN_PUBLISHERPUBLICKEYDIGEST_H
Jeff Thompson8238d002013-07-10 11:56:49 -07009
Jeff Thompson10ad12a2013-09-24 16:19:11 -070010#include "common.h"
11
Jeff Thompson2d27e2f2013-08-09 12:55:00 -070012#ifdef __cplusplus
Jeff Thompson8238d002013-07-10 11:56:49 -070013extern "C" {
14#endif
15
16/**
17 * A PublisherPublicKeyDigest holds a pointer to the publisher public key digest value, if any.
18 * We make a separate struct since this is used by multiple other structs.
19 */
20struct ndn_PublisherPublicKeyDigest {
Jeff Thompson10ad12a2013-09-24 16:19:11 -070021 uint8_t *publisherPublicKeyDigest; /**< pointer to pre-allocated buffer. 0 for none */
Jeff Thompson97223af2013-09-24 17:01:27 -070022 size_t publisherPublicKeyDigestLength; /**< length of publisherPublicKeyDigest. 0 for none */
Jeff Thompson8238d002013-07-10 11:56:49 -070023};
24
25/**
26 * Initialize an ndn_PublisherPublicKeyDigest struct with 0 for none.
27 */
Jeff Thompsond1427fb2013-08-29 17:20:32 -070028static inline void ndn_PublisherPublicKeyDigest_initialize(struct ndn_PublisherPublicKeyDigest *self)
Jeff Thompson8238d002013-07-10 11:56:49 -070029{
30 self->publisherPublicKeyDigest = 0;
31 self->publisherPublicKeyDigestLength = 0;
32}
33
Jeff Thompson2d27e2f2013-08-09 12:55:00 -070034#ifdef __cplusplus
Jeff Thompson8238d002013-07-10 11:56:49 -070035}
36#endif
37
38#endif