diff options
author | bnewbold <bnewbold@robocracy.org> | 2018-10-24 18:36:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-24 18:36:34 +0200 |
commit | 839e2259a5a58009ba3ee0e22a4f31f5c2a09bfd (patch) | |
tree | bc22172e91b04e0fa9d8312e32635dbd5b164345 | |
parent | 61681ac33350f17ad5c2bf12dc1d2b20f80c9b21 (diff) | |
parent | 105b2fe074e0b703777adfaf5e9c7918f6071079 (diff) | |
download | dat-deps-839e2259a5a58009ba3ee0e22a4f31f5c2a09bfd.tar.gz dat-deps-839e2259a5a58009ba3ee0e22a4f31f5c2a09bfd.zip |
Merge pull request #41 from RangerMauve/patch-1
Added functions for sign/verify to DEP 0002
-rw-r--r-- | proposals/0002-hypercore.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/proposals/0002-hypercore.md b/proposals/0002-hypercore.md index 5469cbb..e5b562c 100644 --- a/proposals/0002-hypercore.md +++ b/proposals/0002-hypercore.md @@ -283,6 +283,16 @@ function root_hash (roots) { return blake2b(buffers) } + +function sign (roots, secretKey) { + var hash = root_hash(roots) + + return ed25519.detached.sign(hash, secretKey) +} + +function verify (hash, signature, publicKey) { + return ed25519.detached.verify(hash, signature, publicKey) +} ``` # Parameters |