M5Unit-NFC
0.0.3 git rev:59f5362
Loading...
Searching...
No Matches
secure_zero.hpp
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2025 M5Stack Technology CO LTD
3
*
4
* SPDX-License-Identifier: MIT
5
*/
10
#pragma once
11
12
#include <cstddef>
13
14
namespace
m5
{
15
namespace
nfc
{
16
namespace
crypto {
17
18
inline
void
secure_zero(
void
* p,
const
size_t
n)
19
{
20
if
(!p || n == 0) {
21
return
;
22
}
23
volatile
unsigned
char
*
v
=
reinterpret_cast<
volatile
unsigned
char
*
>
(p);
24
for
(
size_t
i = 0; i < n; ++i) {
25
v
[i] = 0;
26
}
27
}
28
29
}
// namespace crypto
30
}
// namespace nfc
31
}
// namespace m5
m5
Top level namespace of M5stack.
nfc
NFC related definitions.
v
NFC-V definitions.
src
nfc
crypto
secure_zero.hpp
Generated by
1.11.0