@@ -56,7 +56,7 @@ class DeviceKey : private mbed::NonCopyable<DeviceKey> {
56
56
/* *
57
57
* @brief As a singleton, return the single instance of the class.
58
58
* Reason for this class being a singleton is the following:
59
- * - Ease the use for users of this class not having to coordinate instantiations.
59
+ * - Ease of use for users of this class not having to coordinate instantiations.
60
60
* - Lazy instantiation of internal data (which we can't achieve with simple static classes).
61
61
*
62
62
* @returns Singleton instance reference.
@@ -65,15 +65,15 @@ class DeviceKey : private mbed::NonCopyable<DeviceKey> {
65
65
{
66
66
// Use this implementation of singleton (Meyer's) rather than the one that allocates
67
67
// the instance on the heap, as it ensures destruction at program end (preventing warnings
68
- // from memory checking tools such as valgrind).
68
+ // from memory checking tools, such as valgrind).
69
69
static DeviceKey instance;
70
70
return instance;
71
71
}
72
72
73
73
~DeviceKey ();
74
74
75
75
/* * Derive a new key based on the salt string.
76
- * @param isalt Input buffer used to create the new key. Same input will always generate the same key
76
+ * @param isalt Input buffer used to create the new key. Same input always generates the same key
77
77
* @param isalt_size Size of the data in salt buffer.
78
78
* @param output Buffer to receive the derived key. Size must be 16 bytes or 32 bytes
79
79
* according to the ikey_type parameter
@@ -82,7 +82,7 @@ class DeviceKey : private mbed::NonCopyable<DeviceKey> {
82
82
*/
83
83
int generate_derived_key (const unsigned char *isalt, size_t isalt_size, unsigned char *output, uint16_t ikey_type);
84
84
85
- /* * Set a device key into the NVStore. In case TRNG support is missing, Call this method
85
+ /* * Set a device key into the NVStore. If TRNG support is missing, call this method
86
86
* before calling device_key_derived_key. This method should be called only once!
87
87
* @param value Input buffer contain the key.
88
88
* @param isize Size of the supplied key. Must be 16 bytes or 32 bytes.
@@ -124,10 +124,10 @@ class DeviceKey : private mbed::NonCopyable<DeviceKey> {
124
124
125
125
/* * Generate a random ROT key by using TRNG
126
126
* @param output Output buffer for the generated key.
127
- * @param size Input: The size of the buffer. if size is less
128
- * then 16 bytes the method will generate an
129
- * error. 16-31 bytes will create a 16 byte key.
130
- * 32 or higher will generate a 32 bytes key
127
+ * @param size Input: The size of the buffer. If size is less
128
+ * than 16 bytes, the method generates an
129
+ * error. 16-31 bytes creates a 16- byte key.
130
+ * 32 or higher generates a 32-byte key
131
131
* Output: The actual written size to the buffer
132
132
* @return 0 on success, negative error code on failure
133
133
*/
0 commit comments