/*
* Hash a single 512-bit block. This is the core of the algorithm.
*/
-#define a qq[0]
-#define b qq[1]
-#define c qq[2]
-#define d qq[3]
-#define e qq[4]
-
void SHA1Transform(unsigned int state[5], const unsigned char buffer[64]){
unsigned int qq[5]; /* a, b, c, d, e; */
static int one = 1;
memcpy(block, buffer, 64);
memcpy(qq,state,5*sizeof(unsigned int));
+#define a qq[0]
+#define b qq[1]
+#define c qq[2]
+#define d qq[3]
+#define e qq[4]
+
/* Copy p->state[] to working vars */
/*
a = state[0];
state[2] += c;
state[3] += d;
state[4] += e;
+
+#undef a
+#undef b
+#undef c
+#undef d
+#undef e
}
int nByte = sqlite3_value_bytes(argv[0]);
char zOut[44];
+ assert( argc==1 );
if( eType==SQLITE_NULL ) return;
hash_init(&cx);
if( eType==SQLITE_BLOB ){
SHA1Context cx;
char zOut[44];
+ assert( argc==1 );
if( zSql==0 ) return;
hash_init(&cx);
while( zSql[0] ){
case SQLITE_FLOAT: {
sqlite3_uint64 u;
int j;
- unsigned char x[8];
+ unsigned char x[9];
double r = sqlite3_column_double(pStmt,i);
memcpy(&u, &r, 8);
for(j=8; j>=1; j--){
break;
}
case SQLITE_TEXT: {
- int n = sqlite3_column_bytes(pStmt, i);
- const unsigned char *z = sqlite3_column_text(pStmt, i);
- hash_step_vformat(&cx,"T%d:",n);
- hash_step(&cx, z, n);
+ int n2 = sqlite3_column_bytes(pStmt, i);
+ const unsigned char *z2 = sqlite3_column_text(pStmt, i);
+ hash_step_vformat(&cx,"T%d:",n2);
+ hash_step(&cx, z2, n2);
break;
}
case SQLITE_BLOB: {
- int n = sqlite3_column_bytes(pStmt, i);
- const unsigned char *z = sqlite3_column_blob(pStmt, i);
- hash_step_vformat(&cx,"B%d:",n);
- hash_step(&cx, z, n);
+ int n2 = sqlite3_column_bytes(pStmt, i);
+ const unsigned char *z2 = sqlite3_column_blob(pStmt, i);
+ hash_step_vformat(&cx,"B%d:",n2);
+ hash_step(&cx, z2, n2);
break;
}
}
__declspec(dllexport)
#endif
int sqlite3_sha_init(
- sqlite3 *db,
- char **pzErrMsg,
+ sqlite3 *db,
+ char **pzErrMsg,
const sqlite3_api_routines *pApi
){
int rc = SQLITE_OK;
-C Fix\sharmless\scompiler\swarnings\sseen\swith\sMSVC.
-D 2017-02-01T23:06:17.747
+C Fix\sissues\sin\sthe\ssha1\sextension\sseen\swith\sMSVC.
+D 2017-02-02T19:24:05.672
F Makefile.in 5f415e7867296d678fed2e6779aea10c1318b4bc
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc ba953c8921fc7e18333f61898007206de7e23964
F ext/misc/rot13.c 1ac6f95f99b575907b9b09c81a349114cf9be45a
F ext/misc/scrub.c 1c5bfb8b0cd18b602fcb55755e84abf0023ac2fb
F ext/misc/series.c e11e534ada797d5b816d7e7a93c022306563ca35
-F ext/misc/sha1.c b2e4eb8e26f09701ec15548395baf698f00e5895
+F ext/misc/sha1.c 0b9e9b855354910d3ca467bf39099d570e73db56
F ext/misc/showauth.c 732578f0fe4ce42d577e1c86dc89dd14a006ab52
F ext/misc/spellfix.c a4723b6aff748a417b5091b68a46443265c40f0d
F ext/misc/totype.c 4a167594e791abeed95e0a8db028822b5e8fe512
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P aaae74d06f4865818465cfdb440258ae8a5b985a 997f765bc6706769ae15f3e719354473e02bd78b
-R 939bce209d57b72db3d58f9894d61374
-T +closed 997f765bc6706769ae15f3e719354473e02bd78b
+P 0c66cf0f0a9ada2ddcb8d61001ef791b86226416
+R 531254e92dc453ecbaf40de729caeadd
U mistachkin
-Z c2a7081e9858115a573bd4695718af54
+Z 7da98715c0c2c155a034ba4275d6d8fe