Skip to content

Commit 2da54cb

Browse files
author
Amanda Butler
authored
Edit DeviceKey.h
Standardize tense across documents, and edit some existing text for phrasing.
1 parent 6031bc2 commit 2da54cb

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

features/device_key/source/DeviceKey.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class DeviceKey : private mbed::NonCopyable<DeviceKey> {
5656
/**
5757
* @brief As a singleton, return the single instance of the class.
5858
* 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.
6060
* - Lazy instantiation of internal data (which we can't achieve with simple static classes).
6161
*
6262
* @returns Singleton instance reference.
@@ -65,15 +65,15 @@ class DeviceKey : private mbed::NonCopyable<DeviceKey> {
6565
{
6666
// Use this implementation of singleton (Meyer's) rather than the one that allocates
6767
// 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).
6969
static DeviceKey instance;
7070
return instance;
7171
}
7272

7373
~DeviceKey();
7474

7575
/** 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
7777
* @param isalt_size Size of the data in salt buffer.
7878
* @param output Buffer to receive the derived key. Size must be 16 bytes or 32 bytes
7979
* according to the ikey_type parameter
@@ -82,7 +82,7 @@ class DeviceKey : private mbed::NonCopyable<DeviceKey> {
8282
*/
8383
int generate_derived_key(const unsigned char *isalt, size_t isalt_size, unsigned char *output, uint16_t ikey_type);
8484

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
8686
* before calling device_key_derived_key. This method should be called only once!
8787
* @param value Input buffer contain the key.
8888
* @param isize Size of the supplied key. Must be 16 bytes or 32 bytes.
@@ -124,10 +124,10 @@ class DeviceKey : private mbed::NonCopyable<DeviceKey> {
124124

125125
/** Generate a random ROT key by using TRNG
126126
* @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
131131
* Output: The actual written size to the buffer
132132
* @return 0 on success, negative error code on failure
133133
*/

0 commit comments

Comments
 (0)