aotrautils-srv 0.0.810 → 0.0.812
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (25/02/2024-19:33:22)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -1561,7 +1561,7 @@ aotest.profile=function(rootObject,methodName,visited=[]){
|
|
|
1561
1561
|
// NOT AOTESTABLE !
|
|
1562
1562
|
//TODO : develop :
|
|
1563
1563
|
//getHashedString=monitorProgression(100000,
|
|
1564
|
-
window.getHashedString=function(str,/*OPTIONAL*/isHeavyTreatment=false){
|
|
1564
|
+
window.getHashedString=function(str,algorithmName="SHA-256",/*OPTIONAL*/isHeavyTreatment=false){
|
|
1565
1565
|
|
|
1566
1566
|
//CAUTION : YOU MUST *NOT* CHANGE THIS VALUE, UNLESS THE HASH HEAVY TREATMENT VALUE IN YOUR AOTRA SERVER-SIDE CODEIS THE SAME !
|
|
1567
1567
|
const HEAVY_TREATMENT_LOOP_COUNT=100000;
|
|
@@ -1574,7 +1574,7 @@ window.getHashedString=function(str,/*OPTIONAL*/isHeavyTreatment=false){
|
|
|
1574
1574
|
|
|
1575
1575
|
let result=str;
|
|
1576
1576
|
for(var i=0;i<HEAVY_TREATMENT_LOOP_COUNT;i++){
|
|
1577
|
-
result=getHashedString(result,false);
|
|
1577
|
+
result=getHashedString(result,algorithmName,false);
|
|
1578
1578
|
}
|
|
1579
1579
|
|
|
1580
1580
|
|
|
@@ -1585,7 +1585,7 @@ window.getHashedString=function(str,/*OPTIONAL*/isHeavyTreatment=false){
|
|
|
1585
1585
|
|
|
1586
1586
|
// SHA-256 hash (sucks less) :
|
|
1587
1587
|
// DEPENDENCY : SJCL JS libray (Stanford Javascript Crypto Library)
|
|
1588
|
-
if(typeof(sjcl)!="undefined"){
|
|
1588
|
+
if(algorithmName=="SHA-256" && typeof(sjcl)!="undefined"){
|
|
1589
1589
|
let result=sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(str));
|
|
1590
1590
|
|
|
1591
1591
|
// TODO : develop :
|
|
@@ -5283,7 +5283,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
5283
5283
|
|
|
5284
5284
|
|
|
5285
5285
|
|
|
5286
|
-
/*utils SERVER library associated with aotra version : «1_29072022-2359 (
|
|
5286
|
+
/*utils SERVER library associated with aotra version : «1_29072022-2359 (25/02/2024-19:33:22)»*/
|
|
5287
5287
|
/*-----------------------------------------------------------------------------*/
|
|
5288
5288
|
|
|
5289
5289
|
|
|
@@ -6652,7 +6652,7 @@ initNodeServerInfrastructureWrapper=function(doOnClientConnection=null, doOnFina
|
|
|
6652
6652
|
|
|
6653
6653
|
let firstHash=getHashedString(clearTextParam);
|
|
6654
6654
|
|
|
6655
|
-
let generatedHash=getHashedString( firstHash + globalKeyHash, true);// (we use the heavy treatment thing.)
|
|
6655
|
+
let generatedHash=getHashedString( firstHash + globalKeyHash, "SHA-256", true);// (we use the heavy treatment thing.)
|
|
6656
6656
|
globalKeyHashObject.hashes.push(generatedHash);
|
|
6657
6657
|
|
|
6658
6658
|
// We update the repository :
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.812",
|
|
4
4
|
"main": "aotrautils-srv.build.js",
|
|
5
5
|
"description": "A library for vanilla javascript utils (server-side) used in aotra javascript CMS",
|
|
6
6
|
"author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",
|