How to convert a byte to integer?
Here is the python and mojo code:
Moje code prints the byte strings while python prints the interger. How to get integer from byte string in mojo?
![No description](https://cdn.answeroverflow.com/1192787548855078952/image.png)
![No description](https://cdn.answeroverflow.com/1192787549232562398/image.png)
3 Replies
These are the two outputs:
![No description](https://cdn.answeroverflow.com/1192787720850898986/image.png)
@taalhaataahir01022001 you can use something similar to https://github.com/zverianskii/mojosiphash/blob/main/siphash.mojo#L66C39-L66C39
GitHub
mojosiphash/siphash.mojo at main · zverianskii/mojosiphash
Siphash implementation in Mojo. Contribute to zverianskii/mojosiphash development by creating an account on GitHub.
Thanks! it helps