Files
Investidor-V2/outputs/investmoz-audit-current-20261012/node_modules/apache-crypt/src/index.js
T
nala ba1c0340ea
tests / ci (push) Canceled after 0s
oportunidades 8
2026-10-14 08:25:30 +02:00

21 lines
462 B
JavaScript

"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());
};