How to use the mysql/auth.randomInit function in mysql

To help you get started, we’ve selected a few mysql examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mysqljs / mysql / test / simple / test-auth-old.js View on Github external
function test_myrnd_sequence(seed1, seed2, expected){

  var r = auth.randomInit(seed1, seed2);

  for(var i=0; i'+a.substr(1, 16)+'...');
    assert.equal(a.substr(1, 16), b.substr(1, 16));
    sys.print('ok\n');
  }
}
github mysqljs / mysql / test / simple / test-auth-old.js View on Github external
function test_randominit(in1, in2, out1, out2){
  var r = auth.randomInit(in1, in2);
  sys.print('randomInit('+in1+','+in2+')...');
  assert.equal(out1, r.seed1);
  assert.equal(out2, r.seed2);
  sys.print('ok\n');
}