use randomBytes from @noble/hashes.

This commit is contained in:
fiatjaf
2022-01-01 14:59:12 -03:00
parent b271d6c06b
commit 2230f32d11
2 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
import aes from 'browserify-cipher'
import {Buffer} from 'buffer'
import randomBytes from 'randombytes'
import {randomBytes} from '@noble/hashes/utils'
import * as secp256k1 from '@noble/secp256k1'
export function encrypt(privkey, pubkey, text) {

View File

@@ -7,6 +7,7 @@
"url": "https://github.com/fiatjaf/nostr-tools.git"
},
"dependencies": {
"@noble/hashes": "^0.5.7",
"@noble/secp256k1": "^1.3.0",
"browserify-cipher": ">=1",
"buffer": ">=5",
@@ -14,7 +15,6 @@
"dns-packet": "^5.2.4",
"micro-bip32": "^0.1.0",
"micro-bip39": "^0.1.3",
"randombytes": ">=2",
"websocket-polyfill": "^0.0.3"
},
"keywords": [