We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0e255d commit 97d7a22Copy full SHA for 97d7a22
src/bpid/bpid.cpp
@@ -9,6 +9,7 @@
9
*/
10
11
#include "bpid.h"
12
+#include "../sha256/SHA256.h"
13
14
namespace arduino { namespace bpid {
15
@@ -45,9 +46,11 @@ namespace arduino { namespace bpid {
45
46
String get() {
47
uint8_t data[BOARD_PROVISIONING_ID_SIZE];
48
if (!get(data, sizeof(data))) {
- return String("");
49
+ return String("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF");
50
}
- return hexEncode(data, sizeof(data));
51
+ uint8_t out[SHA256::HASH_SIZE];
52
+ arduino::sha256::oneshot(data, sizeof(data), out, sizeof(data));
53
+ return hexEncode(out, sizeof(out));
54
55
56
}} // arduino::bpid
0 commit comments