Skip to content

Commit

Permalink
more rename
Browse files Browse the repository at this point in the history
  • Loading branch information
hathach committed Feb 13, 2020
1 parent 5169aaa commit f5e1e7f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion examples/hash/hash.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/Adafruit_nRFCrypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/Adafruit_nRFCrypto_Hash.cpp → src/nRFCrypto_Hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -57,15 +57,15 @@ 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 );
nRFCrypto.disable();
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);
Expand Down
10 changes: 5 additions & 5 deletions src/Adafruit_nRFCrypto_Hash.h → src/nRFCrypto_Hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -51,4 +51,4 @@ class Adafruit_nRFCrypto_Hash
uint8_t _digest_len;
};

#endif /* ADAFRUIT_NRFCRYPTO_HASH_H_ */
#endif /* NRFCRYPTO_HASH_H_ */

0 comments on commit f5e1e7f

Please sign in to comment.