How to use the mysql/auth.hashPassword 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_hash_password(password, bytes){
  var expected = new Buffer(bytes);
  var actual = auth.hashPassword(password);

  sys.print('hashPassword('+password+')...');
  assert.deepEqual(actual, expected); // , 'hashPassword('+password+') failed');
  sys.print('ok\n');
}