diff --git a/src/crypto/CHIPCryptoPAL.h b/src/crypto/CHIPCryptoPAL.h index 4b77523a3e0b2a..7a5cb1f191d706 100644 --- a/src/crypto/CHIPCryptoPAL.h +++ b/src/crypto/CHIPCryptoPAL.h @@ -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 class SensitiveDataBuffer { @@ -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 class SensitiveDataFixedBuffer {