MCPcopy Create free account
hub / github.com/audacity/audacity / SHA3Final

Function SHA3Final

lib-src/sqlite/shell.c:1865–1881  ·  view source on GitHub ↗

** After all content has been added, invoke SHA3Final() to compute ** the final hash. The function returns a pointer to the binary ** hash value. */

Source from the content-addressed store, hash-verified

1863** hash value.
1864*/
1865static unsigned char *SHA3Final(SHA3Context *p){
1866 unsigned int i;
1867 if( p->nLoaded==p->nRate-1 ){
1868 const unsigned char c1 = 0x86;
1869 SHA3Update(p, &c1, 1);
1870 }else{
1871 const unsigned char c2 = 0x06;
1872 const unsigned char c3 = 0x80;
1873 SHA3Update(p, &c2, 1);
1874 p->nLoaded = p->nRate - 1;
1875 SHA3Update(p, &c3, 1);
1876 }
1877 for(i=0; i<p->nRate; i++){
1878 p->u.x[i+p->nRate] = p->u.x[i^p->ixMask];
1879 }
1880 return &p->u.x[p->nRate];
1881}
1882/* End of the hashing logic
1883*****************************************************************************/
1884

Callers 2

sha3FuncFunction · 0.85
sha3QueryFuncFunction · 0.85

Calls 1

SHA3UpdateFunction · 0.85

Tested by

no test coverage detected