Closed uiur closed 7 years ago
Thanks, fixed in ssb-keys@6.1.2 By the way, we are shifting development of ssb-* modules to use https://github.com/clehner/git-ssb we'll still take pull requests via github, of course, but git-ssb is preferred.
Thanks! git-ssb looks nice.
electron: v1.2.8
ssbKeys.generate()
throws an error in my electron environment.The problem is that
sodium.randombytes(buffer)
returnstrue
in the electron environment. This is weird because it returnsnull
in node environment and works correctly.https://github.com/ssbc/ssb-keys/blob/c6ca6ea4a1433067774515ee3b8b5250962fb050/sodium.js#L9
I think that
seed = seed || sodium.randombytes(seed = new Buffer(32))
is not necessary and removing this line resolves the issue. But I don't understand well how it behaves in other environments.