23 #ifndef NDN_ENCRYPTED_CONTENT_HPP
24 #define NDN_ENCRYPTED_CONTENT_HPP
26 #include "../c/encrypt/algo/encrypt-params-types.h"
27 #include "../key-locator.hpp"
28 #include "../lite/encrypt/encrypted-content-lite.hpp"
43 : algorithmType_((ndn_EncryptAlgorithmType)-1)
51 ndn_EncryptAlgorithmType
87 algorithmType_ = algorithmType;
102 keyLocator_ = keyLocator;
116 initialVector_ = initialVector;
143 return wireFormat.encodeEncryptedContent(*
this);
156 (
const uint8_t *input,
size_t inputLength,
159 wireFormat.decodeEncryptedContent(*
this, input, inputLength);
171 (
const std::vector<uint8_t>& input,
174 wireDecode(&input[0], input.size(), wireFormat);
212 ndn_EncryptAlgorithmType algorithmType_;
EncryptedContent()
Create an EncryptedContent where all the values are unspecified.
Definition: encrypted-content.hpp:42
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:35
EncryptedContent & setInitialVector(const Blob &initialVector)
Set the initial vector.
Definition: encrypted-content.hpp:114
const KeyLocator & getKeyLocator() const
Get the key locator.
Definition: encrypted-content.hpp:59
EncryptedContent & setKeyLocator(const KeyLocator &keyLocator)
Set this object to use a copy of the given KeyLocator object.
Definition: encrypted-content.hpp:100
Blob wireEncode(WireFormat &wireFormat=*WireFormat::getDefaultWireFormat()) const
Encode this EncryptedContent for a particular wire format.
Definition: encrypted-content.hpp:141
const Blob & getPayload() const
Get the payload.
Definition: encrypted-content.hpp:76
An EncryptedContentLite holds an encryption type, a payload and other fields representing encrypted c...
Definition: encrypted-content-lite.hpp:36
An EncryptedContent holds an encryption type, a payload and other fields representing encrypted conte...
Definition: encrypted-content.hpp:37
A Blob holds a pointer to an immutable byte array implemented as const std::vector.
Definition: blob.hpp:42
const uint8_t * buf() const
Return a const pointer to the first byte of the immutable byte array, or 0 if the pointer is null...
Definition: blob.hpp:159
EncryptedContent & setAlgorithmType(ndn_EncryptAlgorithmType algorithmType)
Set the algorithm type.
Definition: encrypted-content.hpp:85
void wireDecode(const uint8_t *input, size_t inputLength, WireFormat &wireFormat=*WireFormat::getDefaultWireFormat())
Decode the input using a particular wire format and update this EncryptedContent. ...
Definition: encrypted-content.hpp:156
size_t size() const
Return the length of the immutable byte array.
Definition: blob.hpp:147
const Blob & getInitialVector() const
Get the initial vector.
Definition: encrypted-content.hpp:69
ndn_EncryptAlgorithmType getAlgorithmType() const
Get the algorithm type.
Definition: encrypted-content.hpp:52
void set(const EncryptedContentLite &encryptedContentLite)
Clear this EncryptedContent, and set the values by copying from encryptedContentLite.
Definition: encrypted-content.cpp:39
EncryptedContent & setPayload(const Blob &payload)
Set the encrypted payload.
Definition: encrypted-content.hpp:128
Definition: key-locator.hpp:35