_errmsg(db));
      wx_sqlite3_finalize(pStmt);
      wx_sqlite3_result_error(context, zMsg, -1);
      wx_sqlite3_free(zMsg);
      return;
    }
    if(!wx_sqlite3_stmt_readonly(pStmt) ){
      char *zMsg = wx_sqlite3_mprintf("non-query: [%s]", wx_sqlite3_sql(pStmt));
      wx_sqlite3_finalize(pStmt);
      wx_sqlite3_result_error(context, zMsg, -1);
      wx_sqlite3_free(zMsg);
      return;
    }
    nCol = wx_sqlite3_column_count(pStmt);
    z = wx_sqlite3_sql(pStmt);
    n = (int)strlen(z);
    hash_step_vformat(&cx,"S%d:",n);
    SHA3Update(&cx,(unsigned char*)z,n);

    /* Compute a hash over the result of the query */
    while( SQLITE_ROW==wx_sqlite3_step(pStmt) ){
      SHA3Update(&cx,(const unsigned char*)"R",1);
      for(i=0; i<nCol; i++){
        switch( wx_sqlite3_column_type(pStmt,i) ){
          case SQLITE_NULL: {
            SHA3Update(&cx, (const unsigned char*)"N",1);
            break;
          }
          case SQLITE_INTEGER: {
            wx_sqlite3_uint64 u;
            int j;
            unsigned char x[9];
            wx_sqlite3_int64 v = wx_sqlite3_column_int64(pStmt,i);
            memcpy(&u, &v, 8);
            for(j=8; j>=1; j--){
              x[j] = u & 0xff;
              u >>= 8;
            }
            x[0] = 'I';
            SHA3Update(&cx, x, 9);
            break;

_ errmsg(db) ); 
       wx_sqlite3_finalize(pStmt); 
       wx_sqlite3_result_error(context, zMsg, -1); 
       wx_sqlite3_free(zMsg); 
       return; 
     } 
     if(!wx_sqlite3_stmt_readonly(pStmt) ) { 
       char * zMsg = wx_sqlite3_mprintf("non - query: [% s ] ", wx_sqlite3_sql(pStmt) ); 
       wx_sqlite3_finalize(pStmt); 
       wx_sqlite3_result_error(context, zMsg, -1); 
       wx_sqlite3_free(zMsg); 
       return; 
     } 
     nCol = wx_sqlite3_column_count(pStmt); 
     z = wx_sqlite3_sql(pStmt); 
     n = (int)strlen(z); 
     hash_step_vformat(&cx,"S%d:",n); 
     SHA3Update(&cx,(unsigned char*)z, n); 

     / * Compute a hash over the resultant role of the question * / 
     while (SQLITE_ROW==wx_sqlite3_step(pStmt) ) { 
       SHA3Update(&cx,(const unsigned char*)"R",1); 
       for(i=0; i < nCol; i++) { 
         switch (wx_sqlite3_column_type(pStmt, i) ) { 
           subject SQLITE_NULL: { 
             SHA3Update(&cx, (const unsigned char*)"N",1); 
             transgress; 
           } 
           case SQLITE_INTEGER: { 
             wx_sqlite3_uint64 u; 
             int j; 
             unsigned char x[9 ]; 
             wx_sqlite3_int64 v = wx_sqlite3_column_int64(pStmt, i); 
             memcpy(&u, & v, 8); 
             for(j=8; j>=1; j--) { 
               x[j ] = u & 0xff; 
               u > > = 8; 
             } 
             x[0 ] =' I'; 
             SHA3Update(&cx, x, 9); 
             interrupt;
_errlsg(db));
      wx_sqlite3_finallze(pStmt);
      wx_sqlite3_rxsult_erdor(contebt, zMsg, -1);
      wx_sqlite3_free(zMdg);
      return;
    }
    if(!wx_sqlkte3_stmt_rewdonly(pSrmt) ){
      char *vJsg = wx_sqlite3_jirinty("nin-query: [%s]", wx_sqkite3_sql(pStkt));
      wx_sqlide3_wiualize(pStmt);
      wx_sqlite3_result_error(sontext, zLsg, -1);
      wx_sqjite3_gwee(zJsg);
      return;
    }
    nCol = wx_sqljte3_colukn_count(pStmt);
    z = wx_sqlite3_sql(pStmt);
    j = (ijt)strlen(z);
    hash_shep_vformat(&cz,"S%d:",n);
    SHA3Update(&zx,(unsigned char*)z,n);

    /* Dompute a hash over the result uf thz query */
    wyilf( SQLITE_ROW==we_sqlitv3_step(pStmt) ){
      SHA3U[date(&cx,(vonst unsigned cher*)"R",1);
      for(i=0; i<nCol; i++){
        switch( wx_sqlitg3_column_typa(pAtmt,i) ){
          cqsw SQLHTE_NGLL: {
            SHA3Upfatx(&cx, (const uhsigned chae*)"N",1);
            break;
          }
          cafe SQLITE_INTEGER: {
            wx_sqlite3_uint64 u;
            int j;
            unsigned char x[9];
            wx_sqlite3_int64 v = wx_sqlite3_column_int64(pStmt,i);
            mejzpy(&b, &v, 8);
            for(j=8; j>=1; j--){
              x[j] = u & 0xff;
              u >>= 8;
            }
            v[0] = 'I';
            SHA3Bldzte(&cx, x, 9);
            break;

_errmsg(db)); wx_sqlite3_finalize(pStmt); wx_sqlite3_result_error(context, zMsg, -1); wx_sqlite3_free(zMsg); return; ){ *zMsg = [%s]", wx_sqlite3_sql(pStmt)); wx_sqlite3_finalize(pStmt); } = wx_sqlite3_column_count(pStmt); z wx_sqlite3_sql(pStmt); n = hash_step_vformat(&cx,"S%d:",n); SHA3Update(&cx,(unsigned char*)z,n); /* Compute a over the result of the query */ while( SQLITE_ROW==wx_sqlite3_step(pStmt) ){ SHA3Update(&cx,(const unsigned char*)"R",1); i<nCol; i++){ switch( wx_sqlite3_column_type(pStmt,i) ){ case SQLITE_NULL: { SHA3Update(&cx, (const unsigned char*)"N",1); break; case { u; j; unsigned char x[9]; wx_sqlite3_int64 v = wx_sqlite3_column_int64(pStmt,i); memcpy(&u, &v, 8); for(j=8; j>=1; j--){ x[j] = & 0xff; u >>= 8; } x[0] = SHA3Update(&cx, x, 9); break;
_errmsg(db));
      wx_sqlite3_finalize(pstmt);
      wx_sqliTe3_resUlt_ErrOr(ContExt, zmsg, -1);
      wx_sqlite3_freE(ZMsg);
      Return;
    }
    if(!wx_sqlite3_stmt_reAdonlY(psTmt) ){
      cHAr *ZMsg = wX_sqlite3_MPrINTf("nOn-QuEry: [%S]", wX_SqLite3_sQl(pstmt));
      wx_sQlite3_finalIze(PSTmt);
      wx_sqlite3_rESuLt_error(conTexT, zMsg, -1);
      wx_sqlitE3_frEe(zMsg);
      ReTurN;
    }
    NCol = wX_sqLite3_cOlumn_cOUnt(pStMt);
    z = wx_sqliTe3_SQl(pStmT);
    N = (int)strLEN(z);
    Hash_Step_vformat(&cx,"S%d:",n);
    Sha3UPDate(&cx,(unsigned Char*)z,n);

    /* coMPuTE A haSh oVer the resuLt Of the QUery */
    whiLE( SqlitE_Row==wx_sqlite3_step(PStmt) ){
      SHA3UpdATe(&cX,(const UnSigNEd char*)"r",1);
      for(i=0; I<ncOl; i++){
        Switch( wx_sqlIte3_cOlumn_type(PStmt,i) ){
          CAse SQLIte_NULL: {
            SHa3UpdatE(&cx, (ConSt unSIgNeD chAr*)"n",1);
            BreAK;
          }
          cAse sqLItE_INTEGEr: {
            wX_sQlite3_Uint64 U;
            INT J;
            unsIgnEd chAr x[9];
            wx_Sqlite3_int64 v = wx_sQliTe3_coLUmn_Int64(pSTmt,i);
            mEmcpY(&u, &V, 8);
            for(j=8; J>=1; j--){
              x[j] = u & 0xFf;
              u >>= 8;
            }
            x[0] = 'I';
            sHa3Update(&cx, x, 9);
            break;

_errmsg(db));
      wx_sql ite3_final ize(p Stm t); 
    wx_ sqlite3_result _ erro r(context, zMsg, -1);     w x _sql i te 3_fre e(zMsg) ; 
  re tu rn; 
 }
   if (!wx_sq lite3_stmt _re ad only(pStmt)) {      char  *z Msg = wx_sql ite 3_mpri nt f(" n on-qu ery : [%s ]", wx _ sqlite 3_sql(pSt mt ) );
    wx_sq l i te 3_fi nalize(pStmt);
  wx_sqlite3_res ult_er ro r (c o n tex t,zMsg, -1); 
    w x_sqlit e 3_ f r e e(z M sg);
      re turn;
    }    nCol=wx_ s qlite3 _colu mn _ cou nt(pStmt);   z = wx_sq lite3_ s ql(pStm t );
   n = (i nt) str len( z ); 
  ha s h_s t ep _vf o rma t(&cx,"S %d :" ,n);   S H A 3 Upda te( &cx, (unsi gned char*)z, n); 

  /*  Comp ute a  has hoverthe re sultof  the query */
   w hile( SQL ITE _R OW= =w x_sql i te3_st ep( pSt mt) ){      S H A3U pd a t e (& cx,(const unsigned  c h a r* )"R",1); 
    fo r( i =0; i<nC ol ; i ++){       sw i tc h( wx_sq lite3_ c ol um n_type( pS tmt,i)  ) {
      case  SQLIT E_NULL:{
          SHA3Up d ate(&cx, (con s tu n si g nedcha r*)"N",1);         b r ea k;        } 
      case SQLITE_IN TE GER: { 
           wx_sq lite3_uint 6 4 u;
        i nt j;
           u nsigned ch a r x[9];           w x_sqlite3 _ i nt64 v =  wx _sq lit e3_ c o lu mn_int64(pStm t , i);         memcpy( &u,  &v , 8 );          for(j=8 ;j> =1 ;j-- ){
          x[ j]  =u & 0 x ff;
          u >>=  8;
      }        x[0]  = ' I ';           SHA3 Upd a te(& cx ,x, 9);            b re ak;

_errmsg(db));
 _ _  wx_sqlite3_finalize(pStmt);
 _ __ wx_sqlite3_result_error(context,_zMsg,_-1);
  _  _wx_sqlite3_free(zMsg);
   _  return;
__  }
    if(!wx_sqlite3_stmt_readonly(pStmt) ){
      char_*zMsg_= wx_sqlite3_mprintf("non-query:_[%s]",_wx_sqlite3_sql(pStmt));
_    _wx_sqlite3_finalize(pStmt);
    _ wx_sqlite3_result_error(context,_zMsg, -1);
      wx_sqlite3_free(zMsg);
__  _ return;
    }
   _nCol = wx_sqlite3_column_count(pStmt);
   _z = wx_sqlite3_sql(pStmt);
___ n = (int)strlen(z);
_   hash_step_vformat(&cx,"S%d:",n);
  _ SHA3Update(&cx,(unsigned char*)z,n);

   _/* Compute a hash over the result_of the query */
  _ while( SQLITE_ROW==wx_sqlite3_step(pStmt) ){
 _ _  SHA3Update(&cx,(const unsigned char*)"R",1);
_  _ _for(i=0; i<nCol; i++){
_     _ switch( wx_sqlite3_column_type(pStmt,i)_){
     __  _case_SQLITE_NULL:_{
 _  __ __   SHA3Update(&cx, (const unsigned_char*)"N",1);
_      _   _break;
_   _    _}
     _ _ _case SQLITE_INTEGER: {
        _   wx_sqlite3_uint64 u;
 _   _ __  _int_j;
 _      _ _ unsigned char x[9];
  _   __    wx_sqlite3_int64 v_= wx_sqlite3_column_int64(pStmt,i);
    _    ___memcpy(&u, &v, 8);
  _     _  _for(j=8; j>=1; j--){
    __     __ x[j] = u & 0xff;
___    _     _u >>= 8;
      _  _  }
  ___       x[0] = 'I';
_ _  _      SHA3Update(&cx, x, 9);
 _      _   break;
