Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug report:To Hex and From Hex does not give expected output. #609

Closed
n4l0cks opened this issue Aug 6, 2019 · 1 comment
Closed

Bug report:To Hex and From Hex does not give expected output. #609

n4l0cks opened this issue Aug 6, 2019 · 1 comment
Labels

Comments

@n4l0cks
Copy link

n4l0cks commented Aug 6, 2019

Bug report:To Hex and From Hex does not give expected output.

Giving input to either To Hex or From Hex does not result in expected output.

Using Cyberchef and giving the following input "12947848928752043" to the function To Hex produces the following output "3132393437383438393238373532303433". However, providing the same input on the site https://www.binaryhexconverter.com/decimal-to-hex-converter give the following output "2E00000000F1AB".

The same goes with the opposite. Providing the following output "2E00000000F1AB" to the function From Hex produces ".....ñ«" while at the binaryhex-website produces "12947848928752043".

Desktop (if relevant, please complete the following information):

  • OS: Windows 10 Enterprise, 1703
  • Browser Firefox Quantum
  • Version 68.0.1 (64-bit

Disclaimer: I'm a bit new to this but I figured it was something strange but maybe I'm just missing some kind of critical information. Sorry if I wasted your time!

@n4l0cks n4l0cks added the bug label Aug 6, 2019
@j433866
Copy link
Member

j433866 commented Aug 6, 2019

When using To / From Hex, CyberChef treats the input as a UTF-8 string, not a numerical value, whereas a decimal to hex converter will treat it as a decimal number.

To get the same result using CyberChef, you can use the To Base operation to convert to a hexadecimal number, and the From Base operation to convert it back to a decimal number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants