Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "kscryp", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "kscryp", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -40,3 +40,3 @@ const KsDp = require('ksdp'); | ||
const drv = this.drv.get({ name: algorithm || this.default, params: [this] }); | ||
if (!drv.encode) { | ||
if (!drv?.encode) { | ||
return null; | ||
@@ -56,3 +56,3 @@ } | ||
const drv = this.drv.get({ name: algorithm || this.default, params: [this] }); | ||
if (!drv.encode) { | ||
if (!drv?.encode) { | ||
return null; | ||
@@ -72,3 +72,3 @@ } | ||
const drv = this.drv.get({ name: algorithm || this.default, params: [this] }); | ||
if (!drv.encode) { | ||
if (!drv?.verify) { | ||
return null; | ||
@@ -86,3 +86,3 @@ } | ||
use() { | ||
this.drv.set(...arguments); | ||
this.drv?.set && this.drv.set(...arguments); | ||
return this; | ||
@@ -95,3 +95,3 @@ } | ||
log() { | ||
this.logger.log && this.logger.log(...arguments); | ||
this.logger?.log && this.logger.log(...arguments); | ||
return this; | ||
@@ -98,0 +98,0 @@ } |
22368