@libp2p/crypto
Advanced tools
| /** | ||
| * Generates a Uint8Array with length `number` populated by random bytes | ||
| * | ||
| * @deprecated use `crypto.getRandomValues()` instead | ||
| */ | ||
| export default function randomBytes(length: number): Uint8Array; | ||
| //# sourceMappingURL=random-bytes.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"random-bytes.d.ts","sourceRoot":"","sources":["../../src/random-bytes.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAK/D"} | ||
| {"version":3,"file":"random-bytes.d.ts","sourceRoot":"","sources":["../../src/random-bytes.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAK/D"} |
| import { InvalidParametersError } from '@libp2p/interface'; | ||
| import { randomBytes as randB } from '@noble/hashes/utils.js'; | ||
| /** | ||
| * Generates a Uint8Array with length `number` populated by random bytes | ||
| * | ||
| * @deprecated use `crypto.getRandomValues()` instead | ||
| */ | ||
@@ -10,4 +11,4 @@ export default function randomBytes(length) { | ||
| } | ||
| return randB(length); | ||
| return crypto.getRandomValues(new Uint8Array(length)); | ||
| } | ||
| //# sourceMappingURL=random-bytes.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"random-bytes.js","sourceRoot":"","sources":["../../src/random-bytes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,WAAW,IAAI,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,MAAc;IACjD,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,sBAAsB,CAAC,oDAAoD,CAAC,CAAA;IACxF,CAAC;IACD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAA;AACtB,CAAC"} | ||
| {"version":3,"file":"random-bytes.js","sourceRoot":"","sources":["../../src/random-bytes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,MAAc;IACjD,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,sBAAsB,CAAC,oDAAoD,CAAC,CAAA;IACxF,CAAC;IACD,OAAO,MAAM,CAAC,eAAe,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC,CAAA;AACvD,CAAC"} |
+5
-5
| { | ||
| "name": "@libp2p/crypto", | ||
| "version": "5.1.19", | ||
| "version": "5.1.20-bfb7ceb0f", | ||
| "description": "Crypto primitives for libp2p", | ||
@@ -93,8 +93,8 @@ "license": "Apache-2.0 OR MIT", | ||
| "dependencies": { | ||
| "@libp2p/interface": "^3.2.3", | ||
| "@libp2p/interface": "3.2.4-bfb7ceb0f", | ||
| "@noble/curves": "^2.0.1", | ||
| "@noble/hashes": "^2.0.1", | ||
| "multiformats": "^14.0.0", | ||
| "protons-runtime": "^6.0.1", | ||
| "uint8arraylist": "^2.4.8", | ||
| "protons-runtime": "^7.0.0", | ||
| "uint8arraylist": "^3.0.2", | ||
| "uint8arrays": "^6.1.1" | ||
@@ -107,3 +107,3 @@ }, | ||
| "benchmark": "^2.1.4", | ||
| "protons": "^8.1.1" | ||
| "protons": "^9.0.1" | ||
| }, | ||
@@ -110,0 +110,0 @@ "browser": { |
| import { InvalidParametersError } from '@libp2p/interface' | ||
| import { randomBytes as randB } from '@noble/hashes/utils.js' | ||
| /** | ||
| * Generates a Uint8Array with length `number` populated by random bytes | ||
| * | ||
| * @deprecated use `crypto.getRandomValues()` instead | ||
| */ | ||
@@ -11,3 +12,3 @@ export default function randomBytes (length: number): Uint8Array { | ||
| } | ||
| return randB(length) | ||
| return crypto.getRandomValues(new Uint8Array(length)) | ||
| } |
| { | ||
| "AESCipher": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_crypto.ciphers.AES_GCM.AESCipher.html", | ||
| "CreateAESCipherOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_crypto.ciphers.AES_GCM.CreateAESCipherOptions.html", | ||
| "create": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.ciphers.AES_GCM.create.html", | ||
| "HMAC": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_crypto.hmac.HMAC.html", | ||
| "./hmac:HMAC": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_crypto.hmac.HMAC.html", | ||
| "./hmac:create": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.hmac.create.html", | ||
| "pbkdf2": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.index.pbkdf2.html", | ||
| "randomBytes": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.index.randomBytes.html", | ||
| "ECDHKey": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_crypto.keys.ECDHKey.html", | ||
| "ECDHKeyPair": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_crypto.keys.ECDHKeyPair.html", | ||
| "EnhancedKey": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_crypto.keys.EnhancedKey.html", | ||
| "EnhancedKeyPair": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_crypto.keys.EnhancedKeyPair.html", | ||
| "Curve": "https://libp2p.github.io/js-libp2p/types/_libp2p_crypto.keys.Curve.html", | ||
| "generateEphemeralKeyPair": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.generateEphemeralKeyPair.html", | ||
| "generateKeyPair": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.generateKeyPair.html", | ||
| "./keys:generateKeyPair": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.generateKeyPair.html", | ||
| "generateKeyPairFromSeed": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.generateKeyPairFromSeed.html", | ||
| "./keys:generateKeyPairFromSeed": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.generateKeyPairFromSeed.html", | ||
| "keyStretcher": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.keyStretcher.html", | ||
| "privateKeyFromCryptoKeyPair": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.privateKeyFromCryptoKeyPair.html", | ||
| "./keys:privateKeyFromCryptoKeyPair": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.privateKeyFromCryptoKeyPair.html", | ||
| "privateKeyFromProtobuf": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.privateKeyFromProtobuf.html", | ||
| "./keys:privateKeyFromProtobuf": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.privateKeyFromProtobuf.html", | ||
| "privateKeyFromRaw": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.privateKeyFromRaw.html", | ||
| "./keys:privateKeyFromRaw": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.privateKeyFromRaw.html", | ||
| "privateKeyToCryptoKeyPair": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.privateKeyToCryptoKeyPair.html", | ||
| "./keys:privateKeyToCryptoKeyPair": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.privateKeyToCryptoKeyPair.html", | ||
| "privateKeyToProtobuf": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.privateKeyToProtobuf.html", | ||
| "./keys:privateKeyToProtobuf": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.privateKeyToProtobuf.html", | ||
| "publicKeyFromMultihash": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.publicKeyFromMultihash.html", | ||
| "./keys:publicKeyFromMultihash": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.publicKeyFromMultihash.html", | ||
| "publicKeyFromProtobuf": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.publicKeyFromProtobuf.html", | ||
| "./keys:publicKeyFromProtobuf": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.publicKeyFromProtobuf.html", | ||
| "publicKeyFromRaw": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.publicKeyFromRaw.html", | ||
| "./keys:publicKeyFromRaw": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.publicKeyFromRaw.html", | ||
| "publicKeyToProtobuf": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.publicKeyToProtobuf.html", | ||
| "./keys:publicKeyToProtobuf": "https://libp2p.github.io/js-libp2p/functions/_libp2p_crypto.keys.publicKeyToProtobuf.html", | ||
| "default": "https://libp2p.github.io/js-libp2p/variables/_libp2p_crypto.webcrypto.default.html", | ||
| "./webcrypto:default": "https://libp2p.github.io/js-libp2p/variables/_libp2p_crypto.webcrypto.default.html" | ||
| } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
2
-33.33%1232120
-7.68%185
-0.54%5912
-1.75%2
100%+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated