Home
last modified time | relevance | path

Searched refs:aHex (Results 1 – 4 of 4) sorted by relevance

/external/ot-br-posix/src/utils/
Dhex.cpp45 int Hex2Bytes(const char *aHex, uint8_t *aBytes, uint16_t aBytesLength) in Hex2Bytes() argument
47 size_t hexLength = strlen(aHex); in Hex2Bytes()
48 const char *hexEnd = aHex + hexLength; in Hex2Bytes()
58 while (aHex < hexEnd) in Hex2Bytes()
60 if ('A' <= *aHex && *aHex <= 'F') in Hex2Bytes()
62 byte |= 10 + (*aHex - 'A'); in Hex2Bytes()
64 else if ('a' <= *aHex && *aHex <= 'f') in Hex2Bytes()
66 byte |= 10 + (*aHex - 'a'); in Hex2Bytes()
68 else if ('0' <= *aHex && *aHex <= '9') in Hex2Bytes()
70 byte |= *aHex - '0'; in Hex2Bytes()
[all …]
Dhex.hpp46 int Hex2Bytes(const char *aHex, uint8_t *aBytes, uint16_t aBytesLength);
48 size_t Bytes2Hex(const uint8_t *aBytes, const uint16_t aBytesLength, char *aHex);
50 size_t Long2Hex(const uint64_t aLong, char *aHex);
/external/ot-br-posix/src/openwrt/ubus/
Dotubus.cpp1742 int UbusServer::Hex2Bin(const char *aHex, uint8_t *aBin, uint16_t aBinLength) in Hex2Bin() argument
1744 size_t hexLength = strlen(aHex); in Hex2Bin()
1745 const char *hexEnd = aHex + hexLength; in Hex2Bin()
1753 while (aHex < hexEnd) in Hex2Bin()
1755 if ('A' <= *aHex && *aHex <= 'F') in Hex2Bin()
1757 byte |= 10 + (*aHex - 'A'); in Hex2Bin()
1759 else if ('a' <= *aHex && *aHex <= 'f') in Hex2Bin()
1761 byte |= 10 + (*aHex - 'a'); in Hex2Bin()
1763 else if ('0' <= *aHex && *aHex <= '9') in Hex2Bin()
1765 byte |= *aHex - '0'; in Hex2Bin()
[all …]
Dotubus.hpp1105 int Hex2Bin(const char *aHex, uint8_t *aBin, uint16_t aBinLength);