Jeff Thompson | 47c93cf | 2013-08-09 00:38:48 -0700 | [diff] [blame] | 1 | /** |
| 2 | * @author: Jeff Thompson |
| 3 | * See COPYING for copyright and distribution information. |
| 4 | */ |
| 5 | |
| 6 | #ifndef NDN_KEY_CHAIN_HPP |
Jeff Thompson | 2d27e2f | 2013-08-09 12:55:00 -0700 | [diff] [blame^] | 7 | #define NDN_KEY_CHAIN_HPP |
Jeff Thompson | 47c93cf | 2013-08-09 00:38:48 -0700 | [diff] [blame] | 8 | |
Jeff Thompson | 3392fd6 | 2013-08-09 12:20:04 -0700 | [diff] [blame] | 9 | #include "data.hpp" |
Jeff Thompson | 47c93cf | 2013-08-09 00:38:48 -0700 | [diff] [blame] | 10 | |
| 11 | namespace ndn { |
| 12 | |
| 13 | class KeyChain { |
| 14 | public: |
| 15 | /** |
Jeff Thompson | 3df8137 | 2013-08-09 12:02:37 -0700 | [diff] [blame] | 16 | * In data, set the signed info publisher public key digest and key locator key to the default public key and set the |
| 17 | * signature using the default private key. |
Jeff Thompson | ade5b1e | 2013-08-09 12:16:45 -0700 | [diff] [blame] | 18 | * Note: the caller must make sure the timestamp is correct, for example with |
| 19 | * data.getSignedInfo().setTimestampMilliseconds(time(NULL) * 1000.0). |
Jeff Thompson | 47c93cf | 2013-08-09 00:38:48 -0700 | [diff] [blame] | 20 | * @param data The Data object to sign and set the signature. |
| 21 | */ |
| 22 | static void defaultSign(Data &data); |
| 23 | |
| 24 | }; |
| 25 | |
| 26 | } |
| 27 | |
| 28 | #endif |