nl:: Weave:: Profiles:: SoftwareUpdate:: IntegritySpec
#include <src/lib/profiles/software-update/SoftwareUpdateProfile.h>
An auxiliary class holding the integrity type and the actual hash of the software update image.
Summary
The object holds the IntegrityTypes field specifying the type of the hash, and the actual hash of the software update image. The length of the hash is fixed based on the type of the hash. The object is sized to hold the largest of the supported hashes.
Constructors and Destructors |
|
---|---|
IntegritySpec()
The default constructor for IntegritySpec.
|
Public attributes |
|
---|---|
type
|
uint8_t
Type of the hash, value to be drawn from IntegrityTypes.
|
value[64]
|
uint8_t
A variable length sequence of bytes containing the integrity value for the software image identified by the URI field.
|
Public functions |
|
---|---|
init(uint8_t, uint8_t *)
|
Explicitly initialize the IntegritySpec object with provided values.
|
operator==(const IntegritySpec &) const
|
bool
An equality operator.
|
pack(MessageIterator &)
|
Serialize the IntegritySpec into provided MessageIterator.
|
Public static functions |
|
---|---|
parse(MessageIterator &, IntegritySpec &)
|
Deserialize the object from the provided MessageIterator into provided IntegritySpec.
|
Public attributes
value
uint8_t value[64]
A variable length sequence of bytes containing the integrity value for the software image identified by the URI field.
The integrity value is computed by applying the integrity function specified by the integrity type to the contents of the software update image accessed at the URI specified above. The integrity specification allows the client to confirm that the image downloaded matches the image specified in this response.
Public functions
IntegritySpec
IntegritySpec()
The default constructor for IntegritySpec.
The object must be initialized either via the init() method or via deserializing it from a message.
init
WEAVE_ERROR init( uint8_t, uint8_t * )
Explicitly initialize the IntegritySpec object with provided values.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
WEAVE_NO_ERROR On success
|
||||
Returns |
WEAVE_ERROR_INVALID_INTEGRITY_TYPE If the provided integrity type is not one of the values specified in IntegrityTypes
|
operator==
bool operator==( const IntegritySpec & ) const
An equality operator.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if all the fields in both objects are equal, false otherwise
|
pack
WEAVE_ERROR pack( MessageIterator & )
Serialize the IntegritySpec into provided MessageIterator.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
Public static functions
parse
WEAVE_ERROR parse( MessageIterator &, IntegritySpec & )
Deserialize the object from the provided MessageIterator into provided IntegritySpec.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
||||
Return Values |
|
||||
Returns |
WEAVE_ERROR_INVALID_INTEGRITY_TYPE If the provided integrity type is not one of the values specified in IntegrityTypes
|