CryptoAuthLib
Atmel CryptoAuthentication Library
atca_helpers.h
Go to the documentation of this file.
1 
42 #ifndef ATCA_HELPERS_H_
43 #define ATCA_HELPERS_H_
44 
45 #include "cryptoauthlib.h"
46 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
58 #ifdef ATCAPRINTF
59 ATCA_STATUS atcab_bin2hex(const uint8_t* binary, int binLen, char* asciiHex, int* asciiHexLen);
60 ATCA_STATUS atcab_bin2hex_(const uint8_t* binary, int binLen, char* asciiHex, int* asciiHexLen, bool addSpace);
61 ATCA_STATUS atcab_hex2bin(const char* asciiHex, int asciiHexLen, uint8_t* binary, int* binLen);
62 #else
63 
64 #define atcab_bin2hex
65 
66 #endif
67 
68 ATCA_STATUS packHex(const char* asciiHex, int asciiHexLen, char* packedHex, int* packedLen);
69 bool isDigit(char c);
70 bool isWhiteSpace(char c);
71 bool isHexAlpha(char c);
72 bool isHex(char c);
73 bool isHexDigit(char c);
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
80 #endif /* ATCA_HELPERS_H_ */
Single aggregation point for all CryptoAuthLib header files.
bool isDigit(char c)
Checks to see if a character is an ASCII representation of a digit ((c ge '0') and (c le '9')) ...
Definition: atca_helpers.c:154
#define atcab_bin2hex
Definition: atca_helpers.h:64
ATCA_STATUS
Definition: atca_status.h:55
bool isHexAlpha(char c)
Checks to see if a character is an ASCII representation of hex ((c ge 'A') and (c le 'F')) || ((c ge ...
Definition: atca_helpers.c:174
bool isHexDigit(char c)
Returns true if this character is a valid hex character.
Definition: atca_helpers.c:195
bool isHex(char c)
Returns true if this character is a valid hex character or if this is whitespace (The character can b...
Definition: atca_helpers.c:185
ATCA_STATUS packHex(const char *asciiHex, int asciiHexLen, char *packedHex, int *packedLen)
Definition: atca_helpers.c:200
bool isWhiteSpace(char c)
Checks to see if a character is whitespace ((c == ' ') || (c == '') || (c == '') || (c == ' ')) ...
Definition: atca_helpers.c:164