ssbc / ssb-keys

keyfile operations for ssb
36 stars 26 forks source link

tests for sign/verify functions #91

Closed staltz closed 3 years ago

staltz commented 3 years ago

Context: we need to sign and verify strings for rooms2 alias registration.

Problem: ssb-keys implements signObj which works only on objects (by calling JSON.stringify), but there is actually already an implementation for sign, it's just not exported. Likewise for verifyObj.

Solution: export sign and verify.

1st commit adds a failing test, 2nd commit adds the implementation that makes tests pass.

arj03 commented 3 years ago

Can you add them to README as well?

staltz commented 3 years ago

Great reminder.