Closed the-kenny closed 4 years ago
Correction: It isn't encoded twice, as toString
on String
is just a no-op. It's still unclear and clearly not intended :-)
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
@christianbundy I don't think this is a bug because there is no double encoding happening here.
I think the confusion comes from a function call tag
that besides doing its job, to tag the input, it's also encoding it, which a different function should do.
Yup, was a misunderstanding on my side :-)
keysToJSON
callstag(key.toString('base64'), curve)
andtag
callskey.toString(base64)
again. This isn't a big issue in itself but might be confusing at some later point when the code gets refactored.https://github.com/ssbc/ssb-keys/blob/master/util.js#L29