mirror of
https://github.com/gchq/CyberChef
synced 2026-01-02 00:23:55 +00:00
Exporing options with API.
This commit is contained in:
@@ -240,6 +240,26 @@ class Dish {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
findType() {
|
||||
if (!this.value) {
|
||||
throw "Dish has no value";
|
||||
}
|
||||
|
||||
const types = [Dish.BYTE_ARRAY, Dish.STRING, Dish.HTML, Dish.NUMBER, Dish.ARRAY_BUFFER, Dish.BIG_NUMBER, Dish.LIST_FILE];
|
||||
|
||||
types.find((type) => {
|
||||
this.type = type;
|
||||
if (this.valid()) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
return this.type;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determines how much space the Dish takes up.
|
||||
|
||||
@@ -45,7 +45,6 @@ class ToBase32 extends Operation {
|
||||
chr1, chr2, chr3, chr4, chr5,
|
||||
enc1, enc2, enc3, enc4, enc5, enc6, enc7, enc8,
|
||||
i = 0;
|
||||
|
||||
while (i < input.length) {
|
||||
chr1 = input[i++];
|
||||
chr2 = input[i++];
|
||||
@@ -76,7 +75,6 @@ class ToBase32 extends Operation {
|
||||
alphabet.charAt(enc4) + alphabet.charAt(enc5) + alphabet.charAt(enc6) +
|
||||
alphabet.charAt(enc7) + alphabet.charAt(enc8);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user