node-webcrypto-ossl
Advanced tools
Comparing version 1.0.38 to 1.0.39
@@ -8,2 +8,3 @@ "use strict"; | ||
const ERR_RANDOM_VALUE_LENGTH = "Failed to execute 'getRandomValues' on 'Crypto': The ArrayBufferView's byte length (%1) exceeds the number of bytes of entropy available via this API (65536)."; | ||
const ERR_RANDOM_NO_VALUE = "Failed to execute 'getRandomValues' on 'Crypto': Expected ArrayBufferView but got %s."; | ||
class WebCrypto { | ||
@@ -27,5 +28,7 @@ constructor(options) { | ||
} | ||
return null; | ||
else { | ||
throw new webcrypto.WebCryptoError(ERR_RANDOM_NO_VALUE, array); | ||
} | ||
} | ||
} | ||
module.exports = WebCrypto; |
/// <reference types="node" /> | ||
/// <reference types="webcrypto-core" /> | ||
/// <reference lib="dom" /> | ||
@@ -49,7 +50,2 @@ declare namespace NodeWebcryptoOpenSSL { | ||
enum KeyType { | ||
PUBLIC = 0, | ||
PRIVATE = 1, | ||
} | ||
class Key { | ||
@@ -100,6 +96,6 @@ public static generateRsa(modulus: number, publicExponent: RsaPublicExponent, callback: (err: Error, key: Key) => void): void; | ||
class CryptoKey implements NativeCryptoKey { | ||
public type: string; | ||
public type: KeyType; | ||
public extractable: boolean; | ||
public algorithm: Algorithm; | ||
public usages: string[]; | ||
public usages: KeyUsage[]; | ||
public readonly native: AesKey | Key; | ||
@@ -178,3 +174,3 @@ private native_: AesKey | Key; | ||
*/ | ||
public getRandomValues(array: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | null): Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | null; | ||
public getRandomValues<T extends Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | null>(array: T): T; | ||
@@ -181,0 +177,0 @@ } |
{ | ||
"name": "node-webcrypto-ossl", | ||
"version": "1.0.38", | ||
"version": "1.0.39", | ||
"repository": { | ||
@@ -42,15 +42,15 @@ "type": "git", | ||
"mkdirp": "^0.5.1", | ||
"nan": "^2.10.0", | ||
"tslib": "^1.9.0", | ||
"webcrypto-core": "^0.1.22" | ||
"nan": "^2.11.1", | ||
"tslib": "^1.9.3", | ||
"webcrypto-core": "^0.1.25" | ||
}, | ||
"devDependencies": { | ||
"@types/mkdirp": "^0.5.2", | ||
"@types/node": "^10.0.8", | ||
"coveralls": "^3.0.1", | ||
"mocha": "^5.1.1", | ||
"nyc": "^11.7.3", | ||
"@types/node": "^10.12.11", | ||
"coveralls": "^3.0.2", | ||
"mocha": "^5.2.0", | ||
"nyc": "^11.9.0", | ||
"pvtsutils": "^1.0.2", | ||
"typescript": "^2.8.3" | ||
"typescript": "3.0.3" | ||
} | ||
} |
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
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
370954
4115
Updatednan@^2.11.1
Updatedtslib@^1.9.3
Updatedwebcrypto-core@^0.1.25