| 1674 | } |
| 1675 | |
| 1676 | void HashContext::Mixin(const void* data, int size) |
| 1677 | { |
| 1678 | if (size >= 1024) |
| 1679 | { |
| 1680 | Val128 hashVal = Hash128(data, size); |
| 1681 | Mixin(&hashVal, 16); |
| 1682 | return; |
| 1683 | } |
| 1684 | |
| 1685 | while (size > 0) |
| 1686 | { |
| 1687 | int addBytes = std::min(size, 1024 - mBufSize); |
| 1688 | |
| 1689 | #ifdef BF_PLATFORM_WINDOWS |
| 1690 | if (mDbgViz) |
| 1691 | { |
| 1692 | int findIdx = 0x2cc159; |
| 1693 | if ((mBufOffset + mBufSize <= findIdx) && (mBufOffset + mBufSize + addBytes > findIdx)) |
| 1694 | { |
| 1695 | NOP; |
| 1696 | } |
| 1697 | } |
| 1698 | #endif |
| 1699 | |
| 1700 | memcpy(&mBuf[mBufSize], data, addBytes); |
| 1701 | mBufSize += addBytes; |
| 1702 | size -= addBytes; |
| 1703 | data = (uint8*)data + addBytes; |
| 1704 | if (mBufSize == 1024) |
| 1705 | { |
| 1706 | Val128 val = Finish128(); |
| 1707 | *(Val128*)mBuf = val; |
| 1708 | mBufSize = 16; |
| 1709 | } |
| 1710 | } |
| 1711 | } |
| 1712 | |
| 1713 | void HashContext::MixinHashContext(HashContext& ctx) |
| 1714 | { |
no outgoing calls
no test coverage detected