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

How to convert to proper hex #4

Open
Bluscream opened this issue Feb 20, 2024 · 0 comments
Open

How to convert to proper hex #4

Bluscream opened this issue Feb 20, 2024 · 0 comments

Comments

@Bluscream
Copy link

Bluscream commented Feb 20, 2024

I tried a lot but can't get it to come to the same output :(

hasher = FNV1a()
hasher._prime = 0xB3CB2E29
hasher._seed = 0x319712C3

    rehash_fnv1a = hasher.hash(dvar.name)
    
    # convert from int64 str ('1ab9184778fd37f9') to int32 hex ('0xFC60C821')
    rehash_fnv1a_bytes = int(rehash_fnv1a,  16) & 0xFFFFFFFF
    rehash_fnv1a_hex = "" # hex(rehash_fnv1a_bytes).upper()
    ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant