Closed kornpow closed 4 years ago
1) use secret_bytes.hex()
no need to use codecs
module
2) error says the length of the master secret in bytes must be an even number, yet you use a secret of 17 bytes which is odd - "how now blue cow" will work
Thanks for the clarification, it was simple :+1: Just to clarify why it was confusing for me, to hopefully feed back into future documentation:
>>> b'how now brown cow'.hex()
'686f77206e6f772062726f776e20636f77'
>>> b'how now blue cow'.hex()
'686f77206e6f7720626c756520636f77'
>>> len(b'how now blue cow'.hex())
32
>>> len(b'how now brown cow'.hex())
34
>>> len(b'how now blue cow')
16
>>> len(b'how now brown cow')
17
My incorrect phrase, in hex form, looks to be even also.
I think error wording is pretty spot-on:
The length of the master secret in bytes must be an even number.
If you have an idea of how to make it even more explicit, let us now.
I am trying to create the hex string to feed in to the cli as the secret.
The way the code does it in default mode:
I know how to do this a few different ways, but they all yield equivalent results as below:
This always gives this result:
Though my result is even also. This is when I looked at the code and found the different form from above.
I know its something simple, but what am I missing?