This commit is contained in:
2023-12-05 17:03:01 +00:00
parent aec42feb5e
commit ea9944383f
1246 changed files with 125706 additions and 0 deletions

20
node_modules/apache-crypt/src/index.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
"use strict";
// Des module.
const des = require("unix-crypt-td-js");
// Hash generation string.
const itoa64 =
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
// Salt generation method.
function getSalt() {
return (
itoa64[parseInt(Math.random() * 64)] + itoa64[parseInt(Math.random() * 64)]
);
}
// Exporting old style.
module.exports = (password, salt) => {
return salt ? des(password, salt) : des(password, getSalt());
};