Jeff Thompson | 8238d00 | 2013-07-10 11:56:49 -0700 | [diff] [blame] | 1 | /** |
Jeff Thompson | 7687dc0 | 2013-09-13 11:54:07 -0700 | [diff] [blame] | 2 | * Copyright (C) 2013 Regents of the University of California. |
| 3 | * @author: Jeff Thompson <jefft0@remap.ucla.edu> |
Jeff Thompson | 8238d00 | 2013-07-10 11:56:49 -0700 | [diff] [blame] | 4 | * See COPYING for copyright and distribution information. |
| 5 | */ |
| 6 | |
| 7 | #ifndef NDN_PUBLISHERPUBLICKEYDIGEST_H |
Jeff Thompson | 2d27e2f | 2013-08-09 12:55:00 -0700 | [diff] [blame] | 8 | #define NDN_PUBLISHERPUBLICKEYDIGEST_H |
Jeff Thompson | 8238d00 | 2013-07-10 11:56:49 -0700 | [diff] [blame] | 9 | |
Jeff Thompson | 10ad12a | 2013-09-24 16:19:11 -0700 | [diff] [blame] | 10 | #include "common.h" |
| 11 | |
Jeff Thompson | 2d27e2f | 2013-08-09 12:55:00 -0700 | [diff] [blame] | 12 | #ifdef __cplusplus |
Jeff Thompson | 8238d00 | 2013-07-10 11:56:49 -0700 | [diff] [blame] | 13 | extern "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 | */ |
| 20 | struct ndn_PublisherPublicKeyDigest { |
Jeff Thompson | 10ad12a | 2013-09-24 16:19:11 -0700 | [diff] [blame] | 21 | uint8_t *publisherPublicKeyDigest; /**< pointer to pre-allocated buffer. 0 for none */ |
Jeff Thompson | 97223af | 2013-09-24 17:01:27 -0700 | [diff] [blame] | 22 | size_t publisherPublicKeyDigestLength; /**< length of publisherPublicKeyDigest. 0 for none */ |
Jeff Thompson | 8238d00 | 2013-07-10 11:56:49 -0700 | [diff] [blame] | 23 | }; |
| 24 | |
| 25 | /** |
| 26 | * Initialize an ndn_PublisherPublicKeyDigest struct with 0 for none. |
| 27 | */ |
Jeff Thompson | d1427fb | 2013-08-29 17:20:32 -0700 | [diff] [blame] | 28 | static inline void ndn_PublisherPublicKeyDigest_initialize(struct ndn_PublisherPublicKeyDigest *self) |
Jeff Thompson | 8238d00 | 2013-07-10 11:56:49 -0700 | [diff] [blame] | 29 | { |
| 30 | self->publisherPublicKeyDigest = 0; |
| 31 | self->publisherPublicKeyDigestLength = 0; |
| 32 | } |
| 33 | |
Jeff Thompson | 2d27e2f | 2013-08-09 12:55:00 -0700 | [diff] [blame] | 34 | #ifdef __cplusplus |
Jeff Thompson | 8238d00 | 2013-07-10 11:56:49 -0700 | [diff] [blame] | 35 | } |
| 36 | #endif |
| 37 | |
| 38 | #endif |