- ATECC*08A
- ATSHA204A
Check out more infos on original repository
- Add support for Arduino devices using Wire library.
- Modify some code for ESP32 to be more easy to use.
- Include
cryptoauthlib.h
in your code. - Configure
cryptoauthlib.h
for boards.
// Enable for ESP32
// Disable for Arduino
// #define ATCA_HAL_ESP32
#ifdef ATCA_HAL_ESP32
#define USE_MBEDTLS
// Change I2C pinout here
#define SDA_PIN 25
#define SCL_PIN 26
#endif
- Happy coding!
// Arduino
ATCAIfaceCfg cfg = cfg_ateccx08a_i2c_arduino;
// ESP32
// ATCAIfaceCfg cfg = cfg_ateccx08a_i2c_esp32;
ATCA_STATUS ret = atcab_init(&cfg);
// Get random number
uint8_t rand[32];
ret = atcab_random(rand);
if(ret != ATCA_SUCCESS){
Serial.printf("ATCA Error ret = %02X\n", ret);
}