Browse Source

forward randomBytes to hypercore-crypto

Kieran Gibb 3 years ago
parent
commit
1a6d8d51dd
No account linked to committer's email address
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      index.js

+ 4
- 0
index.js View File

@@ -9,6 +9,10 @@ class Crypto {
9 9
     return crypto.keyPair(seed)
10 10
   }
11 11
 
12
+  randomBytes(length) {
13
+    return crypto.randomBytes(length)
14
+  }
15
+
12 16
   symmetricKey () {
13 17
     var key = sodium.sodium_malloc(sodium.crypto_secretbox_KEYBYTES)
14 18
     sodium.randombytes_buf(key)