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

ice.sha256 overwrites variable #51

Open
RDmitriev opened this issue Sep 16, 2023 · 1 comment
Open

ice.sha256 overwrites variable #51

RDmitriev opened this issue Sep 16, 2023 · 1 comment

Comments

@RDmitriev
Copy link

RDmitriev commented Sep 16, 2023

Hi

a1 = ice.get_sha256('test')
print(a1)

a2 = ice.get_sha256('test2')
print(a2)
print(a1)

return

b'\x9f\x86\xd0\x81\x88L}e\x9a/\xea\xa0\xc5Z\xd0\x15\xa3\xbfO\x1b+\x0b\x82,\xd1]l\x15\xb0\xf0\n\x08'
b'`0:\xe2+\x99\x88a\xbc\xe3\xb2\x8f3\xee\xc1\xbeu\x8a!<\x86\xc9<\x07m\xbe\x9fU\x8c\x11\xc7R'
b'`0:\xe2+\x99\x88a\xbc\xe3\xb2\x8f3\xee\xc1\xbeu\x8a!<\x86\xc9<\x07m\xbe\x9fU\x8c\x11\xc7R'

How to fix this without unnecessary action

a1 = bytearray.fromhex(ice.get_sha256('test').hex())

I need a return in bytes

@RDmitriev
Copy link
Author

Fixed it ice.get_sha256(cpub)+b'\x00'
Added zero byte

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