Maxim Integrated / Mbed 2 deprecated DeepCover Embedded Security in IoT

Dependencies:   MaximInterface mbed

Revision:
6:b6bafd0a7013
Parent:
1:e1c7c1c636af
Child:
20:cdba71cb5506
diff -r 63232ef22abe -r b6bafd0a7013 common.cpp
--- a/common.cpp	Wed Apr 20 20:13:33 2016 +0000
+++ b/common.cpp	Thu May 12 14:40:14 2016 -0500
@@ -33,9 +33,9 @@
 
 #include "common.hpp"
 
-const std::size_t charsPerByte = 2;
+const size_t charsPerByte = 2;
 
-std::string byteArrayToHexString(const std::uint8_t * byteArray, std::size_t byteArraySize)
+std::string byteArrayToHexString(const uint8_t * byteArray, size_t byteArraySize)
 {
   std::string hexString;
   hexString.reserve(byteArraySize * charsPerByte);
@@ -43,10 +43,10 @@
   return hexString;
 }
 
-void byteArrayToHexString(const std::uint8_t * byteArray, std::size_t byteArraySize, std::string & hexString)
+void byteArrayToHexString(const uint8_t * byteArray, size_t byteArraySize, std::string & hexString)
 {
   char hexBuf[charsPerByte + 1];
-  for (std::size_t i = 0; i < byteArraySize; i++)
+  for (size_t i = 0; i < byteArraySize; i++)
   {
     std::snprintf(hexBuf, (sizeof(hexBuf) / sizeof(hexBuf[0])), "%2.2X", byteArray[i]);
     hexString.append(hexBuf, charsPerByte);