1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Enhance sqlite3_randomness(N,P) such that it resets the internal PRNG

if N is less than 1.  Subsequent calls to sqlite3_randomness() will reinitialize
the internal PRNG by calling the xRandomness() method of the default VFS.

FossilOrigin-Name: a221aa82bb5496885fd0bf76e4601443799511de
This commit is contained in:
drh
2014-01-01 14:00:13 +00:00
parent 3312348cf8
commit fe98081e18
6 changed files with 26 additions and 21 deletions

View File

@@ -3101,7 +3101,7 @@ int sqlite3_test_control(int op, ...){
** to the xRandomness method of the default VFS.
*/
case SQLITE_TESTCTRL_PRNG_RESET: {
sqlite3PrngResetState();
sqlite3_randomness(0,0);
break;
}