Skip to content

Commit 82409f8

Browse files
committed
Bpid add SHA256
1 parent b0e255d commit 82409f8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/bpid/bpid.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
#include "bpid.h"
12+
#include "../sha256/SHA256.h"
1213

1314
namespace arduino { namespace bpid {
1415

@@ -47,7 +48,9 @@ namespace arduino { namespace bpid {
4748
if (!get(data, sizeof(data))) {
4849
return String("");
4950
}
50-
return hexEncode(data, sizeof(data));
51+
uint8_t out[SHA256::HASH_SIZE];
52+
arduino::sha256::oneshot(data, sizeof(data), out);
53+
return hexEncode(out, sizeof(out));
5154
}
5255

5356
}} // arduino::bpid

0 commit comments

Comments
 (0)