MCPcopy Create free account
hub / github.com/HyperDbg/HyperDbg / BinaryToInt

Function BinaryToInt

hyperdbg/script-engine/code/common.c:1513–1527  ·  view source on GitHub ↗

* @brief Converts a binary string to integer * * @param str the binary string to convert * @return unsigned long long */

Source from the content-addressed store, hash-verified

1511 * @return unsigned long long
1512 */
1513unsigned long long
1514BinaryToInt(char * str)
1515{
1516 SIZE_T Len;
1517 unsigned long long Acc = 0;
1518
1519 Len = strlen(str);
1520
1521 for (int i = 0; i < Len; i++)
1522 {
1523 Acc <<= 1;
1524 Acc += (str[i] - '0');
1525 }
1526 return Acc;
1527}
1528
1529/**
1530 * @brief Rotate a character array to the left by one time

Callers 1

ToSymbolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected