CyberChef icon indicating copy to clipboard operation
CyberChef copied to clipboard

Feature request: Hex with two's complement

Open kinow opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe.

I have some data with strings like -16777216, that can be converted to hex as -FF0100. But for the sign, we can apply Two's complements to display hex signed 2's complement FF00FF00 like here: https://www.rapidtables.com/convert/number/decimal-to-hex.html

Describe the solution you'd like

See above.

Describe alternatives you've considered

https://www.rapidtables.com/convert/number/decimal-to-hex.html

Additional context

Sorry, the JSON is from an internal project.

Thanks!

kinow avatar Dec 09 '21 05:12 kinow

This would also be useful for converting Mifare serial numbers, which are often returned by card readers as a single large decimal number, which cannot be used as input for the "To Hex" step as it is not a byte array.

LRSFC-DanJ avatar Jul 26 '23 10:07 LRSFC-DanJ