You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -43,17 +46,25 @@ Currently the server just has one endpoint: `/bake`. This endpoint accepts a POS
43
46
|---|---|---|
44
47
input|String|The input data for the recipe. Currently accepts strings.
45
48
recipe|String or Object or Array|One or more operations, with optional arguments. Uses default arguments if they're not defined here.
49
+
outputType (optional)|String|The [Data Type](https://github.com/gchq/CyberChef/wiki/Adding-a-new-operation#data-types) that you would like the result of the bake to be returned as. This will not work with `File` or `List<File>` at the moment.
@@ -100,10 +123,35 @@ For more information on how operation names are handled, see the [Node API docs]
100
123
"MD4"
101
124
]
102
125
}
103
-
// response: 31d6cfe0d16ae931b73c59d7e0c089c0
126
+
127
+
```
128
+
Response:
129
+
```javascript
130
+
{
131
+
value:"31d6cfe0d16ae931b73c59d7e0c089c0",
132
+
type:"string"
133
+
}
104
134
```
105
135
106
136
137
+
#### Example: Define outputType
138
+
`toDecimal` has an outputType of `string`. Here we are asking to translate the output to a number before returning.
139
+
```javascript
140
+
{
141
+
"input":"One, two, three, four.",
142
+
"recipe":"to decimal",
143
+
"outputType":"number"
144
+
}
145
+
```
146
+
Response:
147
+
```javascript
148
+
{
149
+
// Be wary, type conversions do not always behave as expected.
150
+
"value":79,
151
+
"type":"number"
152
+
}
153
+
```
154
+
107
155
## Licencing
108
156
109
157
CyberChef-server is released under the [Apache 2.0 Licence](https://www.apache.org/licenses/LICENSE-2.0) and is covered by [Crown Copyright](https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/).
0 commit comments