(value)
| 205 | } |
| 206 | |
| 207 | function onInputBaseChange(value) { |
| 208 | setInputBase(value); |
| 209 | |
| 210 | if(value === 'bin') { |
| 211 | if(inputBase === 'text') setInput(stringToBinary(input)); |
| 212 | if(inputBase === 'hex') setInput(hexToBinary(input)); |
| 213 | setInputPlaceholderInput('10101...'); |
| 214 | } |
| 215 | |
| 216 | if(value === 'text') { |
| 217 | if(inputBase === 'bin') { |
| 218 | setInput(binaryToString(input)); |
| 219 | if(binaryToString(input) === '\x00') setInput(''); |
| 220 | }; |
| 221 | |
| 222 | if(inputBase === 'hex') {setInput(hexToString(input));} |
| 223 | |
| 224 | setInputPlaceholderInput('Input...'); |
| 225 | } |
| 226 | |
| 227 | if(value === 'hex') { |
| 228 | if(inputBase === 'bin') setInput(binaryToHex(input)); |
| 229 | if(inputBase === 'text') setInput(stringToHex(input)); |
| 230 | |
| 231 | setInputPlaceholderInput('a1b5c8'); |
| 232 | } |
| 233 | |
| 234 | ReactGA.event('onInputBaseChange'); |
| 235 | } |
| 236 | |
| 237 | function onClockFinish() { |
| 238 | let cyclesCount = paddedInput.length/512; |
nothing calls this directly
no test coverage detected