EncryptedContent Class¶
Experimental
The EncryptedContent class is experimental and the API is not finalized.
An EncryptedContent holds a payload and other fields representing encrypted content for Name-based Access Control.
[C++]: | #include <ndn-cpp/encrypt/encrypted-content.hpp> Namespace:
ndn |
---|---|
[Python]: | Module: pyndn.encrypt |
[Java]: | Package: net.named_data.jndn.encrypt |
EncryptedContent Constructors¶
EncryptedContent Constructor (default)¶
Experimental
The EncryptedContent class is experimental and the API is not finalized.
Create an EncryptedContent where all the values are unspecified. You can initialize the object with wireDecodeV2.
[C++]: | EncryptedContent();
|
---|---|
[Python]: | def __init__(self)
|
[JavaScript]: | var EncryptedContent = function EncryptedContent()
|
[Java]: | public EncryptedContent()
|
EncryptedContent Constructor (copy)¶
Experimental
The EncryptedContent class is experimental and the API is not finalized.
Create a new EncryptedContent as a deep copy of the given object.
[C++]: | EncryptedContent(
const EncryptedContent& encryptedContent
);
|
---|---|
[Python]: | def __init__(self,
encryptedContent # EncryptedContent
)
|
[JavaScript]: | var EncryptedContent = function EncryptedContent(
encryptedContent // EncryptedContent
)
|
[Java]: | public EncryptedContent(
EncryptedContent encryptedContent
)
|
Parameters: |
|
EncryptedContent Get Methods¶
EncryptedContent.getInitialVector Method¶
Experimental
The EncryptedContent class is experimental and the API is not finalized.
Get the initial vector.
[C++]: | const Blob& getInitialVector() const;
|
---|---|
[Python]: | # Returns Blob
def getInitialVector(self)
|
[JavaScript]: | // Returns Blob
EncryptedContent.prototype.getInitialVector = function()
|
[Java]: | public final Blob getInitialVector()
|
Returns: | The initial vector. If not specified, isNull() is true. |
EncryptedContent.getKeyLocatorName Method¶
Experimental
The EncryptedContent class is experimental and the API is not finalized.
Check that the key locator type is KEYNAME and return the key Name.
[C++]: | const Name& getKeyLocatorName() const;
|
---|---|
[Python]: | # Returns Name
def getKeyLocatorName(self)
|
[JavaScript]: | // Returns Name
EncryptedContent.prototype.getKeyLocatorName = function()
|
[Java]: | public final Name getKeyLocatorName()
|
Returns: | The key Name. |
Throw: | Throw an exception if the key locator type is not KEYNAME. |
EncryptedContent.getPayload Method¶
Experimental
The EncryptedContent class is experimental and the API is not finalized.
Get the unencrypted payload.
[C++]: | const Blob& getPayload() const;
|
---|---|
[Python]: | # Returns Blob
def getPayload(self)
|
[JavaScript]: | // Returns Blob
EncryptedContent.prototype.getPayload = function()
|
[Java]: | public final Blob getPayload()
|
Returns: | The payload. If not specified, isNull() is true. |
EncryptedContent.getPayloadKey Method¶
Experimental
The EncryptedContent class is experimental and the API is not finalized.
Get the encrypted payload key.
[C++]: | const Blob& getPayloadKey() const;
|
---|---|
[Python]: | # Returns Blob
def getPayloadKey(self)
|
[JavaScript]: | // Returns Blob
EncryptedContent.prototype.getPayloadKey = function()
|
[Java]: | public final Blob getPayloadKey()
|
Returns: | The encrypted payload key. If not specified, isNull() is true. |
EncryptedContent.wireDecodeV2 Methods¶
EncryptedContent.wireDecodeV2 Method (from Blob)¶
Experimental
The EncryptedContent class is experimental and the API is not finalized.
Decode the input as an EncryptedContent v2 and update this EncryptedContent. (The wireDecode() method was for API version 1 which is deprecated.)
[C++]: | void wireDecodeV2(
const Blob& input
);
|
---|---|
[Python]: | def wireDecodeV2(self,
input # Blob
)
|
[JavaScript]: | EncryptedContent.prototype.wireDecodeV2 = function(
input // Blob
)
|
[Java]: | public final void wireDecodeV2(
Blob content
)
|
Parameters: |
|
EncryptedContent.wireDecodeV2 Method (from byte array)¶
Experimental
The EncryptedContent class is experimental and the API is not finalized.
Decode the input as an EncryptedContent v2 and update this EncryptedContent. (The wireDecode() method was for API version 1 which is deprecated.)
[C++]: | void wireDecodeV2(
const std::vector<uint8_t>& input
);
void wireDecodeV2(
const uint8_t *input,
size_t inputLength
);
|
---|---|
[Python]: | def wireDecodeV2(self,
input # an array type with int elements
)
|
[JavaScript]: | EncryptedContent.prototype.wireDecodeV2 = function(
input // Buffer
)
|
[Java]: | public final void wireDecodeV2(
ByteBuffer input
)
|
Parameters: |
|