MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / processBuffer

Method processBuffer

src/sha3.cpp:217–231  ·  view source on GitHub ↗

process everything left in the internal buffer

Source from the content-addressed store, hash-verified

215
216/// process everything left in the internal buffer
217void SHA3::processBuffer()
218{
219 // add padding
220 size_t offset = m_bufferSize;
221 // add a "1" byte
222 m_buffer[offset++] = 0x06;
223 // fill with zeros
224 while (offset < m_blockSize)
225 m_buffer[offset++] = 0;
226
227 // and add a single set bit
228 m_buffer[offset - 1] |= 0x80;
229
230 processBlock(m_buffer);
231}
232
233
234/// return latest hash as 16 hex characters

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected