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

converting Strings > Buffers #12

Open
mixmix opened this issue Feb 6, 2020 · 1 comment
Open

converting Strings > Buffers #12

mixmix opened this issue Feb 6, 2020 · 1 comment

Comments

@mixmix
Copy link
Member

mixmix commented Feb 6, 2020

In a few places, like where we're dealing with labels in DeriveSecret spec, we have Strings, but are combining this with a Buffer (e.g. binary format feed_id), and then passing this to hkdf.expand ...

Do we need to specify how to combine Strings and Buffers?
In JS, I convert everything to Buffers, and then in slp-encoding, we've got buffer concatenation...so it all works. I'm explicitly converting string to buffers like this:

Buffer.from('header_key', 'utf8')

i.e. specifying the encoding I'm converting from into Buffer.
Is this obvious or do we need to say it?

@mixmix
Copy link
Member Author

mixmix commented Feb 6, 2020

At the very least the test vectors will surface any problem...

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