Consulta Detalle de pedido
This commit is contained in:
16
src/scripts/helpers.js
Normal file
16
src/scripts/helpers.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const crypto = require('crypto');
|
||||
|
||||
/**
|
||||
* Convierte una cadena de texto a su hash MD5.
|
||||
* @param {string} data_string La cadena a convertir.
|
||||
* @returns {string} El hash MD5.
|
||||
*/
|
||||
function stringTo_md5(data_string) {
|
||||
const md5 = crypto.createHash('md5').update(data_string, 'utf-8').digest('hex');
|
||||
// console.log("MD5: ", md5); // Descomentar para depuración
|
||||
return md5;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
stringTo_md5,
|
||||
};
|
||||
Reference in New Issue
Block a user