mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 06:55:08 -04:00
Merge 73a39fa3ce
into 7c8be12d52
This commit is contained in:
commit
a3ae783715
1 changed files with 3 additions and 2 deletions
|
@ -45,11 +45,12 @@ class ToDecimal extends Operation {
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
run(input, args) {
|
run(input, args) {
|
||||||
input = new Uint8Array(input);
|
|
||||||
const delim = Utils.charRep(args[0]),
|
const delim = Utils.charRep(args[0]),
|
||||||
signed = args[1];
|
signed = args[1];
|
||||||
if (signed) {
|
if (signed) {
|
||||||
input = input.map(v => v > 0x7F ? v - 0xFF - 1 : v);
|
input = new Int8Array(input);
|
||||||
|
} else {
|
||||||
|
input = new Uint8Array(input);
|
||||||
}
|
}
|
||||||
return input.join(delim);
|
return input.join(delim);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue