We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ab3feb7 + 13b4ef1 commit d8de3caCopy full SHA for d8de3ca
lib/auth_plugins/sha256_password.js
@@ -2,7 +2,7 @@
2
3
const PLUGIN_NAME = 'sha256_password';
4
const crypto = require('crypto');
5
-const { xor } = require('../auth_41');
+const { xorRotating } = require('../auth_41');
6
7
const REQUEST_SERVER_KEY_PACKET = Buffer.from([1]);
8
@@ -11,7 +11,7 @@ const STATE_WAIT_SERVER_KEY = 1;
11
const STATE_FINAL = -1;
12
13
function encrypt(password, scramble, key) {
14
- const stage1 = xor(
+ const stage1 = xorRotating(
15
Buffer.from(`${password}\0`, 'utf8').toString('binary'),
16
scramble.toString('binary')
17
);
0 commit comments