mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-02 14:11:02 +01:00
Changed 'Number' option to 'Integer' in PRNG op
This commit is contained in:
parent
7176e5ca6e
commit
6f59d9217c
@ -521,7 +521,7 @@ DES uses a key length of 8 bytes (64 bits).`;
|
||||
* @default
|
||||
*/
|
||||
PRNG_BYTES: 32,
|
||||
PRNG_OUTPUT: ["Hex", "Number", "Byte array", "Raw"],
|
||||
PRNG_OUTPUT: ["Hex", "Integer", "Byte array", "Raw"],
|
||||
|
||||
/**
|
||||
* Pseudo-Random Number Generator operation.
|
||||
@ -549,7 +549,7 @@ DES uses a key length of 8 bytes (64 bits).`;
|
||||
switch (outputAs) {
|
||||
case "Hex":
|
||||
return forge.util.bytesToHex(bytes);
|
||||
case "Number":
|
||||
case "Integer":
|
||||
for (i = bytes.length - 1; i >= 0; i--) {
|
||||
value = value.mul(256).plus(bytes.charCodeAt(i));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user