Closed mvondracek closed 4 years ago
I think that a way how CLI tool communicates with user and internal handling of data are two separate things. Our CLI tool should accept binary or hexa strings. However, I suggest that our package handles seed and entrophy as single type. Whether it should be bytes
or str
depends on operations we will perform with seed and entropy. What do you think?
Ok, you are right that its different, but, if we are implementing checks for both formats of input we may as well include both in the library. Or would that make the interface messy? Based on the required functionality seed should be definitely a string, entropy would make more sense to me as bytes, but I am not sure here.
seed should be definitely a string
Why should it? Should we display it or store somewhere? Actually, it's used for generating wallets, but the functionality of our project ends at this point.
page 5 specifies "Output: seed and initial entropy as hexadecimal strings"
As seed is output from PBKDF2, it could be more efective to handle it as bytes
.
I am talking about separation of real data and representation of that data. Our tool should now read seed and entropy as hexa or binary and then print them as hexa strings.
What about having seed and entropy as bytes for now? It can be changed, if implementation proves that string would be better.
Ok
I bet it wouldn't, but anyway we could add some functionality for converting input from string to bytes.
Input conversion is a one-liner. I'll do that in CLI tool.
Public API is only
generate
,recover
,verify
.