Parcourir la source

Changed 'Number' option to 'Integer' in PRNG op

n1474335 il y a 7 ans
Parent
commit
6f59d9217c
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/core/operations/Cipher.js

+ 2 - 2
src/core/operations/Cipher.js

@@ -521,7 +521,7 @@ DES uses a key length of 8 bytes (64 bits).`;
      * @default
      * @default
      */
      */
     PRNG_BYTES: 32,
     PRNG_BYTES: 32,
-    PRNG_OUTPUT: ["Hex", "Number", "Byte array", "Raw"],
+    PRNG_OUTPUT: ["Hex", "Integer", "Byte array", "Raw"],
 
 
     /**
     /**
      * Pseudo-Random Number Generator operation.
      * Pseudo-Random Number Generator operation.
@@ -549,7 +549,7 @@ DES uses a key length of 8 bytes (64 bits).`;
         switch (outputAs) {
         switch (outputAs) {
             case "Hex":
             case "Hex":
                 return forge.util.bytesToHex(bytes);
                 return forge.util.bytesToHex(bytes);
-            case "Number":
+            case "Integer":
                 for (i = bytes.length - 1; i >= 0; i--) {
                 for (i = bytes.length - 1; i >= 0; i--) {
                     value = value.mul(256).plus(bytes.charCodeAt(i));
                     value = value.mul(256).plus(bytes.charCodeAt(i));
                 }
                 }