Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/sqlite/blob/master/tool/pagesig.c # sqlite [Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `sqlite / tool / pagesig.c` 92 lines ยท 2373 bytes Raw Blame History 1 /* 2 ** 2013-10-01 3 ** 4 ** The author disclaims copyright to this source code. In place of 5 ** a legal notice, here is a blessing: 6 ** 7 ** May you do good and not evil. 8 ** May you find forgiveness for yourself and forgive others. 9 ** May you share freely, never taking more than you give. 10 ** 11 ****************************************************************************** 12 ** 13 ** Compute hash signatures for every page of a database file. This utility 14 ** program is useful for analyzing the output logs generated by the 15 ** ext/misc/vfslog.c extension. 16 */ 17 #include 18 #include 19 #include 20 #include 21 22 /* 23 ** Compute signature for a block of content. 24 ** 25 ** For blocks of 16 or fewer bytes, the signature is just a hex dump of 26 ** the entire block. 27 ** 28 ** For blocks of more than 16 bytes, the signature is a hex dump of the 29 ** first 8 bytes followed by a 64-bit hash of the entire block. 30 */ 31 static void vlogSignature(unsigned char *p, int n, char *zCksum){ 32 unsigned int s0 = 0, s1 = 0; 33 unsigned int *pI; 34 int i; 35 if( n<=16 ){ 36 for(i=0; i