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

add tests for sign and verify with a weird obj #82

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

staltz
Copy link
Member

@staltz staltz commented Sep 27, 2020

I don't know if anyone out there uses ssb-keys this way, but this is currently supported:

ssbKeys.signObj(keys, someBuffer, anotherBuffer)

That is, the object being signed is a Buffer. Now, this currently executes without errors because every Buffer is an object. But should we forbid this usage?

Created as a draft to indicate I don't want to merge yet before we discuss about it.

@davegomez
Copy link
Contributor

The most extended form of an object to sign in signObject I have seen so far is this:

{
    "address": "net:192.168 ... MpNw="
}

I would say that for type safety sakes, only "real objects" should be allowed in these two functions. In this case, having a less easy developer experience worth it.

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

Successfully merging this pull request may close these issues.

None yet

2 participants