MCPcopy Create free account
hub / github.com/ElementsProject/elements / readIndex

Function readIndex

src/simplicity/rsort.c:22–24  ·  view source on GitHub ↗

Return the 'i'th char of the object representation of the midstate pointed to by a. * * In C, values are represented as 'unsigned char [sizeof(v)]' array. However the exact * specification of how this representation works is implementation defined. * * For the 'uint32_t' values of 'sha256_midstate', the object representation of these values will differ * between big endian and little endian

Source from the content-addressed store, hash-verified

20 * i < sizeof(a->s);
21 */
22static unsigned char readIndex(const sha256_midstate* a, unsigned int i) {
23 return ((const unsigned char*)(a->s))[i];
24}
25
26/* Given an array of midstate pointers,
27 * count the frequencies of the values of the 'j'th character of each midstate's internal representation.

Callers 2

freqFunction · 0.85
sort_bucketsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected