@iov/crypto
Advanced tools
Comparing version 0.16.3 to 0.17.0
@@ -12,2 +12,4 @@ "use strict"; | ||
__export(require("./libsodium")); | ||
var random_1 = require("./random"); | ||
exports.Random = random_1.Random; | ||
__export(require("./secp256k1")); | ||
@@ -14,0 +16,0 @@ var secp256k1signature_1 = require("./secp256k1signature"); |
@@ -29,12 +29,2 @@ "use strict"; | ||
exports.Argon2id = Argon2id; | ||
class Random { | ||
// Get `count` bytes of cryptographically secure random bytes | ||
static getBytes(count) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
yield libsodium_wrappers_1.default.ready; | ||
return libsodium_wrappers_1.default.randombytes_buf(count); | ||
}); | ||
} | ||
} | ||
exports.Random = Random; | ||
class Ed25519Keypair { | ||
@@ -41,0 +31,0 @@ // a libsodium privkey has the format `<ed25519 privkey> + <ed25519 pubkey>` |
{ | ||
"name": "@iov/crypto", | ||
"version": "0.16.3", | ||
"version": "0.17.0", | ||
"description": "Cryptography resources for IOV projects", | ||
@@ -9,2 +9,9 @@ "author": "IOV SAS <admin@iov.one>", | ||
"types": "types/index.d.ts", | ||
"files": [ | ||
"build/", | ||
"types/", | ||
"*.md", | ||
"!*.spec.*", | ||
"!**/testdata/" | ||
], | ||
"repository": { | ||
@@ -35,3 +42,3 @@ "type": "git", | ||
"dependencies": { | ||
"@iov/encoding": "^0.16.3", | ||
"@iov/encoding": "^0.17.0", | ||
"bip39": "^3.0.2", | ||
@@ -50,3 +57,3 @@ "bn.js": "^4.11.8", | ||
}, | ||
"gitHead": "cc43ddcf2e5915a3ab934f11cf013d791a415d60" | ||
"gitHead": "14d6a2689d50a25d3946de962a56b16940f93a79" | ||
} |
@@ -6,2 +6,3 @@ export * from "./bip39"; | ||
export * from "./libsodium"; | ||
export { Random } from "./random"; | ||
export * from "./secp256k1"; | ||
@@ -8,0 +9,0 @@ export { ExtendedSecp256k1Signature, Secp256k1Signature } from "./secp256k1signature"; |
@@ -14,5 +14,2 @@ import { As } from "type-tagger"; | ||
} | ||
export declare class Random { | ||
static getBytes(count: number): Promise<Uint8Array>; | ||
} | ||
export declare class Ed25519Keypair { | ||
@@ -19,0 +16,0 @@ static fromLibsodiumPrivkey(libsodiumPrivkey: Uint8Array): Ed25519Keypair; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
0
72613
36
952
1
+ Added@iov/encoding@0.17.8(transitive)
- Removed@iov/encoding@0.16.3(transitive)
Updated@iov/encoding@^0.17.0