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.
Context: we need to sign and verify strings for rooms2 alias registration.
Problem:
ssb-keys
implementssignObj
which works only on objects (by calling JSON.stringify), but there is actually already an implementation forsign
, it's just not exported. Likewise forverifyObj
.Solution: export
sign
andverify
.1st commit adds a failing test, 2nd commit adds the implementation that makes tests pass.