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 | 2d27e2f | 2013-08-09 12:55:00 -0700 | [diff] [blame] | 10 | #ifdef __cplusplus |
Jeff Thompson | 8238d00 | 2013-07-10 11:56:49 -0700 | [diff] [blame] | 11 | extern "C" { |
| 12 | #endif |
| 13 | |
| 14 | /** |
| 15 | * A PublisherPublicKeyDigest holds a pointer to the publisher public key digest value, if any. |
| 16 | * We make a separate struct since this is used by multiple other structs. |
| 17 | */ |
| 18 | struct ndn_PublisherPublicKeyDigest { |
Jeff Thompson | 2d27e2f | 2013-08-09 12:55:00 -0700 | [diff] [blame] | 19 | unsigned char *publisherPublicKeyDigest; /**< pointer to pre-allocated buffer. 0 for none */ |
Jeff Thompson | 8238d00 | 2013-07-10 11:56:49 -0700 | [diff] [blame] | 20 | unsigned int publisherPublicKeyDigestLength; /**< length of publisherPublicKeyDigest. 0 for none */ |
| 21 | }; |
| 22 | |
| 23 | /** |
| 24 | * Initialize an ndn_PublisherPublicKeyDigest struct with 0 for none. |
| 25 | */ |
Jeff Thompson | d1427fb | 2013-08-29 17:20:32 -0700 | [diff] [blame] | 26 | static inline void ndn_PublisherPublicKeyDigest_initialize(struct ndn_PublisherPublicKeyDigest *self) |
Jeff Thompson | 8238d00 | 2013-07-10 11:56:49 -0700 | [diff] [blame] | 27 | { |
| 28 | self->publisherPublicKeyDigest = 0; |
| 29 | self->publisherPublicKeyDigestLength = 0; |
| 30 | } |
| 31 | |
Jeff Thompson | 2d27e2f | 2013-08-09 12:55:00 -0700 | [diff] [blame] | 32 | #ifdef __cplusplus |
Jeff Thompson | 8238d00 | 2013-07-10 11:56:49 -0700 | [diff] [blame] | 33 | } |
| 34 | #endif |
| 35 | |
| 36 | #endif |