File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 12
12
13
13
#include < ArduinoECCX08.h>
14
14
15
+ #define TEMPKEY_SLOT 0xFFFF
16
+
15
17
byte nonceKey[] = {
16
18
0x10 , 0x10 , 0x10 , 0x10
17
19
};
@@ -47,7 +49,7 @@ void setup() {
47
49
}
48
50
49
51
// Starting HMAC operation on tempkey slot
50
- if (!ECCX08.beginHMAC (0xFFFF )) {
52
+ if (!ECCX08.beginHMAC (TEMPKEY_SLOT )) {
51
53
Serial.println (" Failed to start HMAC operation." );
52
54
while (1 );
53
55
}
Original file line number Diff line number Diff line change @@ -444,13 +444,14 @@ int ECCX08Class::lock()
444
444
int ECCX08Class::beginHMAC (uint16_t keySlot)
445
445
{
446
446
// HMAC implementation is only for ATECC608
447
- long ver = version () & 0x0F00000 ;
448
- if (ver != 0x0600000 ) {
447
+ uint8_t status;
448
+ long ecc608ver = 0x0600000 ;
449
+ long eccCurrVer = version () & 0x0F00000 ;
450
+
451
+ if (eccCurVer != ecc608ver) {
449
452
return 0 ;
450
453
}
451
454
452
- uint8_t status;
453
-
454
455
if (!wakeup ()) {
455
456
return 0 ;
456
457
}
You can’t perform that action at this time.
0 commit comments