@consento/crypto
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "@consento/crypto", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Crypto functionality used in Consento", | ||
@@ -12,2 +12,3 @@ "main": "index.js", | ||
"buffer": "^5.6.0", | ||
"get-random-values-polypony": "^1.0.0", | ||
"sodium-universal": "^2.0.0" | ||
@@ -14,0 +15,0 @@ }, |
@@ -15,2 +15,5 @@ "use strict"; | ||
function setup(crypto) { | ||
if (crypto === null || crypto === undefined) { | ||
throw new Error('No crypto library specified.'); | ||
} | ||
if (cache.has(crypto)) { | ||
@@ -17,0 +20,0 @@ return cache.get(crypto); |
@@ -21,2 +21,5 @@ import { ICryptoCore } from './core/types' | ||
export function setup (crypto: ICryptoCore): IConsentoCrypto { | ||
if (crypto === null || crypto === undefined) { | ||
throw new Error('No crypto library specified.') | ||
} | ||
if (cache.has(crypto)) { | ||
@@ -23,0 +26,0 @@ return cache.get(crypto) |
Sorry, the diff of this file is not supported yet
156235
3004
4
+ Addedget-random-values-polypony@1.0.0(transitive)