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

TypeError: can't concat str to bytes (python 3) #1

Open
lestephane opened this issue Mar 12, 2020 · 1 comment
Open

TypeError: can't concat str to bytes (python 3) #1

lestephane opened this issue Mar 12, 2020 · 1 comment
Labels
good first issue Good for newcomers

Comments

@lestephane
Copy link

Any clue how to make it work in a python 3 context?

$ python mk_ed25519_key.py 
Traceback (most recent call last):
  File "mk_ed25519_key.py", line 95, in <module>
    keydata =  putEd25519Key(sk, c)
  File "mk_ed25519_key.py", line 77, in putEd25519Key
    privkey_block += chr(n & 0xFF)
TypeError: can't concat str to bytes
@blackknight36
Copy link
Owner

Most likely the issue is that chr(n & 0xFF) is returning a string value which needs to be converted to binary in order to be added to the privkey_block data. I haven't tested this script on python3 but I can look into it when I have some time.

@blackknight36 blackknight36 added the good first issue Good for newcomers label Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants