From f5e1e7feaf632b22cfffbf18339802fa2bf476b9 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 13 Feb 2020 15:22:15 +0700 Subject: [PATCH] more rename --- examples/hash/hash.ino | 2 +- src/Adafruit_nRFCrypto.h | 2 +- ...{Adafruit_nRFCrypto_Hash.cpp => nRFCrypto_Hash.cpp} | 8 ++++---- src/{Adafruit_nRFCrypto_Hash.h => nRFCrypto_Hash.h} | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) rename src/{Adafruit_nRFCrypto_Hash.cpp => nRFCrypto_Hash.cpp} (90%) rename src/{Adafruit_nRFCrypto_Hash.h => nRFCrypto_Hash.h} (90%) diff --git a/examples/hash/hash.ino b/examples/hash/hash.ino index cffebcf..201204f 100644 --- a/examples/hash/hash.ino +++ b/examples/hash/hash.ino @@ -22,7 +22,7 @@ uint8_t input_data[] = 0x65, 0xa2, 0x32, 0xd6, 0xbc, 0xd0, 0xf9, 0x39, 0xed, 0x1f, 0xe1, 0x28, 0xc1, 0x3b, 0x0e, 0x1b }; -Adafruit_nRFCrypto_Hash hash; +nRFCrypto_Hash hash; // the setup function runs once when you press reset or power the board void setup() diff --git a/src/Adafruit_nRFCrypto.h b/src/Adafruit_nRFCrypto.h index 0e09bd5..7141bb0 100644 --- a/src/Adafruit_nRFCrypto.h +++ b/src/Adafruit_nRFCrypto.h @@ -29,7 +29,7 @@ #include "rtos.h" #include "nRFCrypto_Random.h" -#include "Adafruit_nRFCrypto_Hash.h" +#include "nRFCrypto_Hash.h" #include "ecc/nRFCrypto_ECC.h" class Adafruit_nRFCrypto diff --git a/src/Adafruit_nRFCrypto_Hash.cpp b/src/nRFCrypto_Hash.cpp similarity index 90% rename from src/Adafruit_nRFCrypto_Hash.cpp rename to src/nRFCrypto_Hash.cpp index b1374f3..8013ea0 100644 --- a/src/Adafruit_nRFCrypto_Hash.cpp +++ b/src/nRFCrypto_Hash.cpp @@ -41,12 +41,12 @@ static const uint8_t digest_len_arr[] = //------------- IMPLEMENTATION -------------// -Adafruit_nRFCrypto_Hash::Adafruit_nRFCrypto_Hash(void) +nRFCrypto_Hash::nRFCrypto_Hash(void) { _digest_len = 0; } -bool Adafruit_nRFCrypto_Hash::begin(CRYS_HASH_OperationMode_t mode) +bool nRFCrypto_Hash::begin(CRYS_HASH_OperationMode_t mode) { nRFCrypto.enable(); @@ -57,7 +57,7 @@ bool Adafruit_nRFCrypto_Hash::begin(CRYS_HASH_OperationMode_t mode) return true; } -bool Adafruit_nRFCrypto_Hash::update(uint8_t data[], size_t size) +bool nRFCrypto_Hash::update(uint8_t data[], size_t size) { nRFCrypto.enable(); VERIFY_ERROR( CRYS_HASH_Update(&_context, data, size), false ); @@ -65,7 +65,7 @@ bool Adafruit_nRFCrypto_Hash::update(uint8_t data[], size_t size) return true; } -uint8_t Adafruit_nRFCrypto_Hash::end(uint32_t result[16]) +uint8_t nRFCrypto_Hash::end(uint32_t result[16]) { nRFCrypto.enable(); VERIFY_ERROR( CRYS_HASH_Finish(&_context, result), 0); diff --git a/src/Adafruit_nRFCrypto_Hash.h b/src/nRFCrypto_Hash.h similarity index 90% rename from src/Adafruit_nRFCrypto_Hash.h rename to src/nRFCrypto_Hash.h index f3b61c8..60368e7 100644 --- a/src/Adafruit_nRFCrypto_Hash.h +++ b/src/nRFCrypto_Hash.h @@ -22,15 +22,15 @@ * THE SOFTWARE. */ -#ifndef ADAFRUIT_NRFCRYPTO_HASH_H_ -#define ADAFRUIT_NRFCRYPTO_HASH_H_ +#ifndef NRFCRYPTO_HASH_H_ +#define NRFCRYPTO_HASH_H_ #include "nrf_cc310/include/crys_hash.h" -class Adafruit_nRFCrypto_Hash +class nRFCrypto_Hash { public: - Adafruit_nRFCrypto_Hash(void); + nRFCrypto_Hash(void); bool begin(CRYS_HASH_OperationMode_t mode); bool begin(uint32_t mode) @@ -51,4 +51,4 @@ class Adafruit_nRFCrypto_Hash uint8_t _digest_len; }; -#endif /* ADAFRUIT_NRFCRYPTO_HASH_H_ */ +#endif /* NRFCRYPTO_HASH_H_ */