Skip to content

Commit

Permalink
[crypto] Post-merge review: add sensitive data buffer doc (#24585)
Browse files Browse the repository at this point in the history
Add documentation to SensitiveData[Fixed]Buffer clases.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
  • Loading branch information
Damian-Nordic authored and pull[bot] committed Dec 6, 2023
1 parent 10599c4 commit 3075240
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/crypto/CHIPCryptoPAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,12 @@ class ECPKey
const Sig & signature) const = 0;
};

/**
* @brief Helper class for holding sensitive data that should be erased from memory after use.
*
* The sensitive data buffer is a variable-length, fixed-capacity buffer class that securely erases
* the contents of a buffer when the buffer is destroyed.
*/
template <size_t kCapacity>
class SensitiveDataBuffer
{
Expand Down Expand Up @@ -291,6 +297,12 @@ class SensitiveDataBuffer
size_t mLength = 0;
};

/**
* @brief Helper class for holding fixed-sized sensitive data that should be erased from memory after use.
*
* The sensitive data buffer is a fixed-length, fixed-capacity buffer class that securely erases
* the contents of a buffer when the buffer is destroyed.
*/
template <size_t kCapacity>
class SensitiveDataFixedBuffer
{
Expand Down

0 comments on commit 3075240

Please sign in to comment.