Skip to content

Commit

Permalink
renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
hathach committed Feb 13, 2020
1 parent 83a06dc commit 5169aaa
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/Adafruit_nRFCrypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "common_inc.h"
#include "rtos.h"

#include "Adafruit_nRFCrypto_Random.h"
#include "nRFCrypto_Random.h"
#include "Adafruit_nRFCrypto_Hash.h"
#include "ecc/nRFCrypto_ECC.h"

Expand All @@ -43,7 +43,7 @@ class Adafruit_nRFCrypto
void enable(void);
void disable(void);

Adafruit_nRFCrypto_Random Random;
nRFCrypto_Random Random;

private:
uint32_t _en_count;
Expand Down
16 changes: 8 additions & 8 deletions src/Adafruit_nRFCrypto_Random.cpp → src/nRFCrypto_Random.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@


//------------- IMPLEMENTATION -------------//
Adafruit_nRFCrypto_Random::Adafruit_nRFCrypto_Random(void)
nRFCrypto_Random::nRFCrypto_Random(void)
{
_begun = false;
}

bool Adafruit_nRFCrypto_Random::begin(void)
bool nRFCrypto_Random::begin(void)
{
// skip if already called begin before
if (_begun) return true;
Expand All @@ -56,7 +56,7 @@ bool Adafruit_nRFCrypto_Random::begin(void)
return true;
}

void Adafruit_nRFCrypto_Random::end(void)
void nRFCrypto_Random::end(void)
{
// skipped if not begin-ed
if (!_begun) return;
Expand All @@ -72,12 +72,12 @@ void Adafruit_nRFCrypto_Random::end(void)
}


CRYS_RND_State_t* Adafruit_nRFCrypto_Random::getContext(void)
CRYS_RND_State_t* nRFCrypto_Random::getContext(void)
{
return &_state;
}

bool Adafruit_nRFCrypto_Random::addAdditionalInput(uint8_t* input, uint16_t size)
bool nRFCrypto_Random::addAdditionalInput(uint8_t* input, uint16_t size)
{
nRFCrypto.enable();

Expand All @@ -89,7 +89,7 @@ bool Adafruit_nRFCrypto_Random::addAdditionalInput(uint8_t* input, uint16_t size
return true;
}

bool Adafruit_nRFCrypto_Random::reseed(void)
bool nRFCrypto_Random::reseed(void)
{
CRYS_RND_WorkBuff_t* workbuf = (CRYS_RND_WorkBuff_t*) rtos_malloc(sizeof(CRYS_RND_WorkBuff_t));
VERIFY(workbuf);
Expand All @@ -106,7 +106,7 @@ bool Adafruit_nRFCrypto_Random::reseed(void)
return true;
}

bool Adafruit_nRFCrypto_Random::generate(uint8_t* buf, uint16_t bufsize)
bool nRFCrypto_Random::generate(uint8_t* buf, uint16_t bufsize)
{
nRFCrypto.enable();

Expand All @@ -118,7 +118,7 @@ bool Adafruit_nRFCrypto_Random::generate(uint8_t* buf, uint16_t bufsize)
return true;
}

bool Adafruit_nRFCrypto_Random::generateInRange(uint8_t* buf, uint32_t bitsize, uint8_t* max)
bool nRFCrypto_Random::generateInRange(uint8_t* buf, uint32_t bitsize, uint8_t* max)
{
nRFCrypto.enable();

Expand Down
10 changes: 5 additions & 5 deletions src/Adafruit_nRFCrypto_Random.h → src/nRFCrypto_Random.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
* THE SOFTWARE.
*/

#ifndef ADAFRUIT_NRFCRYPTO_RANDOM_H_
#define ADAFRUIT_NRFCRYPTO_RANDOM_H_
#ifndef NRFCRYPTO_RANDOM_H_
#define NRFCRYPTO_RANDOM_H_

#include "nrf_cc310/include/crys_rnd.h"

class Adafruit_nRFCrypto_Random
class nRFCrypto_Random
{
public:
Adafruit_nRFCrypto_Random(void);
nRFCrypto_Random(void);

bool begin(void);
void end(void);
Expand All @@ -49,4 +49,4 @@ class Adafruit_nRFCrypto_Random
bool _begun;
};

#endif /* ADAFRUIT_NRFCRYPTO_RANDOM_H_ */
#endif /* NRFCRYPTO_RANDOM_H_ */

0 comments on commit 5169aaa

Please sign in to comment.