mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-07 12:52:54 -05:00
Add support for IIS account migration.
This commit is contained in:
14
pass.js
14
pass.js
@@ -39,4 +39,16 @@ exports.hash = function (pwd, salt, fn) {
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
exports.iishash = function (type, pwd, salt, fn) {
|
||||
if (type == 0) {
|
||||
fn(null, pwd);
|
||||
} else if (type == 1) {
|
||||
const hash = crypto.createHash('sha1');
|
||||
hash.update(Buffer.concat([new Buffer(salt, 'base64'), new Buffer(pwd, 'utf16le')]));
|
||||
fn(null, hash.digest().toString('base64'));
|
||||
} else {
|
||||
fn('invalid type');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user