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
No description
3 Replies
taalhaataahir01022001
These are the two outputs:
No description
zverianskii
zverianskii12mo ago
@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.
taalhaataahir01022001
Thanks! it helps
Want results from more Discord servers?
Add your server