Explorar el Código

Converts constants in RandomUtil to hex.

master
paweldomas hace 9 años
padre
commit
333cd6f25f
Se han modificado 1 ficheros con 6 adiciones y 6 borrados
  1. 6
    6
      modules/util/RandomUtil.js

+ 6
- 6
modules/util/RandomUtil.js Ver fichero

@@ -17,20 +17,20 @@ var RandomUtil = {
17 17
     /**
18 18
      * Generates hex number with length 4
19 19
      */
20
-    random4digitsHex: function() {
21
-        return rangeRandomHex(4096, 65535);
20
+    random4digitsHex: function () {
21
+        return rangeRandomHex(0x1000, 0xFFFF);
22 22
     },
23 23
     /**
24 24
      * Generates hex number with length 8
25 25
      */
26
-    random8digitsHex: function() {
27
-        return rangeRandomHex(268435456, 4294967295);
26
+    random8digitsHex: function () {
27
+        return rangeRandomHex(0x10000000, 0xFFFFFFFF);
28 28
     },
29 29
     /**
30 30
      * Generates hex number with length 12
31 31
      */
32
-    random12digitsHex: function() {
33
-        return rangeRandomHex(17592186044416, 281474976710655);
32
+    random12digitsHex: function () {
33
+        return rangeRandomHex(0x100000000000, 0xFFFFFFFFFFFF);
34 34
     }
35 35
 };
36 36
 

Loading…
Cancelar
Guardar