Skip to content

Commit

Permalink
Proxy/JsonGenerator warning fixes: IOCDM.h & ICryptography.h
Browse files Browse the repository at this point in the history
  • Loading branch information
HaseenaSainul committed Jan 12, 2024
1 parent 596164e commit e8417c2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions interfaces/ICryptography.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace Exchange {
enum { ID = ID_CRYPTOGRAPHY_RANDOM };

// Generates an array of cryptographically strong random bytes
virtual uint16_t Generate(const uint16_t length, uint8_t data[] /* @out @length:length */) const = 0;
virtual uint16_t Generate(const uint16_t length, uint8_t data[] /* @out @length:return @maxlength:length */) const = 0;
};

struct EXTERNAL IHash : virtual public Core::IUnknown {
Expand All @@ -65,7 +65,7 @@ namespace Exchange {
virtual uint32_t Ingest(const uint32_t length /* @restrict:4M-1 */, const uint8_t data[] /* @in @length:length */) = 0;

// Calculate the hash from all ingested data
virtual uint8_t Calculate(const uint8_t maxLength, uint8_t data[] /* @out @length:maxLength */) = 0;
virtual uint8_t Calculate(const uint8_t maxLength, uint8_t data[] /* @out @length:return @maxlength:maxLength */) = 0;
};

struct EXTERNAL ICipher : virtual public Core::IUnknown {
Expand All @@ -79,12 +79,12 @@ namespace Exchange {
// Encrypt data
virtual int32_t Encrypt(const uint8_t ivLength, const uint8_t iv[] /* @in @length:ivLength */,
const uint32_t inputLength /* @restrict:4M-1 */, const uint8_t input[] /* @in @length:inputLength */,
const uint32_t maxOutputLength, uint8_t output[] /* @out @length:maxOutputLength */) const = 0;
const uint32_t maxOutputLength, uint8_t output[] /* @out @length:return @maxlength:maxOutputLength */) const = 0;

// Decrypt data
virtual int32_t Decrypt(const uint8_t ivLength, const uint8_t iv[] /* @in @length:ivLength */,
const uint32_t inputLength /* @restrict:4M-1 */, const uint8_t input[] /* @in @length:inputLength */,
const uint32_t maxOutputLength, uint8_t output[] /* @out @length:maxOutputLength */) const = 0;
const uint32_t maxOutputLength, uint8_t output[] /* @out @length:return @maxlength:maxOutputLength */) const = 0;
};

struct EXTERNAL IDiffieHellman : virtual public Core::IUnknown {
Expand Down Expand Up @@ -140,13 +140,13 @@ namespace Exchange {
virtual uint32_t Import(const uint16_t length, const uint8_t blob[] /* @in @length:length */) = 0;

// Export unencrypted data blob out of the vault (returns blob ID), only public blobs are exportable
virtual uint16_t Export(const uint32_t id, const uint16_t maxLength, uint8_t blob[] /* @out @length:maxLength */) const = 0;
virtual uint16_t Export(const uint32_t id, const uint16_t maxLength, uint8_t blob[] /* @out @length:return @maxlength:maxLength */) const = 0;

// Set encrypted data blob in the vault (returns blob ID)
virtual uint32_t Set(const uint16_t length, const uint8_t blob[] /* @in @length:length */) = 0;

// Get encrypted data blob out of the vault (data identified by ID, returns size of the retrieved data)
virtual uint16_t Get(const uint32_t id, const uint16_t maxLength, uint8_t blob[] /* @out @length:maxLength */) const = 0;
virtual uint16_t Get(const uint32_t id, const uint16_t maxLength, uint8_t blob[] /* @out @length:return @maxlength:maxLength */) const = 0;

// Generates a random data blob of specified length in the vault (returns blob ID)
virtual uint32_t Generate(const uint16_t length) = 0;
Expand Down
8 changes: 4 additions & 4 deletions interfaces/IOCDM.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ struct ISessionExt : virtual public Core::IUnknown {

virtual OCDM_RESULT StoreLicenseData(const uint8_t licenseData[] /* @in @length:licenseDataSize */,
uint16_t licenseDataSize,
uint8_t* secureStopId /* @out @length:16 */)
uint8_t* secureStopId /* @out @length:16 @maxlength:licenseDataSize */)
= 0;

virtual OCDM_RESULT SelectKeyId(const uint8_t keyLength,
Expand Down Expand Up @@ -225,7 +225,7 @@ struct IAccessorOCDM : virtual public Core::IUnknown {
virtual uint32_t ResetSecureStops(const std::string& keySystem) = 0;

virtual OCDM_RESULT GetSecureStopIds(const std::string& keySystem,
uint8_t ids[] /* @out @length:idsLength */, uint16_t idsLength,
uint8_t ids[] /* @out @length:16 @maxlength:idsLength */, uint16_t idsLength,
uint32_t& count /* @inout */)
= 0;

Expand All @@ -247,12 +247,12 @@ struct IAccessorOCDM : virtual public Core::IUnknown {
virtual OCDM_RESULT DeleteSecureStore(const std::string& keySystem) = 0;

virtual OCDM_RESULT GetKeyStoreHash(const std::string& keySystem,
uint8_t keyStoreHash[] /* @out @length:keyStoreHashLength */,
uint8_t keyStoreHash[] /* @out @length:16 @maxlength:keyStoreHashLength */,
uint16_t keyStoreHashLength)
= 0;

virtual OCDM_RESULT GetSecureStoreHash(const std::string& keySystem,
uint8_t secureStoreHash[] /* @out @length:secureStoreHashLength */,
uint8_t secureStoreHash[] /* @out @length:16 @maxlength:secureStoreHashLength */,
uint16_t secureStoreHashLength)
= 0;
};
Expand Down
12 changes: 6 additions & 6 deletions interfaces/IZigWave.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ namespace WPEFramework {
};

struct Controller {
bool Permutable;
string Port;
uint32_t Id;
uint8_t Major;
uint8_t Minor;
uint16_t Nodes;
bool Permutable /* @brief Permutable or not */;
string Port /* @brief Port number */;
uint32_t Id /* @brief Controller Id */;
uint8_t Major /* @brief Major number */;
uint8_t Minor /* @brief Minor number */;
uint16_t Nodes /* @brief Number of Nodes */;
};

using IDeviceIterator = RPC::IIteratorType<Device, ID_ZIGWAVE_DEVICE_ITERATOR>;
Expand Down

0 comments on commit e8417c2

Please sign in to comment.