Jeff Thompson | 4147191 | 2013-09-12 16:21:50 -0700 | [diff] [blame^] | 1 | /** |
| 2 | * @author: Jeff Thompson |
| 3 | * See COPYING for copyright and distribution information. |
| 4 | */ |
| 5 | |
| 6 | #ifndef NDN_IDENTITY_MANAGER_HPP |
| 7 | #define NDN_IDENTITY_MANAGER_HPP |
| 8 | |
| 9 | #include "../data.hpp" |
| 10 | |
| 11 | namespace ndn { |
| 12 | |
| 13 | class IdentityManager { |
| 14 | public: |
| 15 | /** |
| 16 | * |
| 17 | * Note: the caller must make sure the timestamp in data is correct, for example with |
| 18 | * data.getMetaInfo().setTimestampMilliseconds(time(NULL) * 1000.0). |
| 19 | * @param data The Data object to sign and update its signature. |
| 20 | * @param certificateName The Name identifying the certificate which identifies the signing key. |
| 21 | * @param wireFormat The WireFormat for calling encodeData, or WireFormat::getDefaultWireFormat() if omitted. |
| 22 | */ |
| 23 | void signByCertificate(const Data& data, const Name& certificateName, WireFormat& wireFormat = *WireFormat::getDefaultWireFormat()); |
| 24 | }; |
| 25 | |
| 26 | } |
| 27 | |
| 28 | #endif |