@bettercorp/tools
Advanced tools
Comparing version 1.0.6 to 1.0.7
import * as MOMENT from 'moment'; | ||
import { MergeObjectsKey } from './Interfaces'; | ||
export declare class Tools { | ||
static encrypt(text: string, key: string): string; | ||
static decrypt(text: string, key: string): string; | ||
static inIframe(): boolean; | ||
@@ -5,0 +7,0 @@ static setUpdatedTemplatePathFinder(path: string, endObj: any, workingTemplate: any): any; |
@@ -14,2 +14,4 @@ "use strict"; | ||
const MOMENT = require("moment"); | ||
const CryptoAES = require("crypto-js/aes"); | ||
const CryptoENC = require("crypto-js/enc-utf8"); | ||
var stream = require('stream'); | ||
@@ -26,2 +28,8 @@ var Transform = stream.Transform; | ||
class Tools { | ||
static encrypt(text, key) { | ||
return CryptoAES.encrypt(text, key).toString(); | ||
} | ||
static decrypt(text, key) { | ||
return CryptoAES.decrypt(text, key).toString(CryptoENC); | ||
} | ||
static inIframe() { | ||
@@ -28,0 +36,0 @@ try { |
@@ -17,6 +17,8 @@ { | ||
"main": "lib/index.js", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"dependencies": { | ||
"@types/node": "^14.10.2", | ||
"@types/uuid": "^8.0.0", | ||
"crypto": "^1.0.1", | ||
"crypto-js": "^4.0.0", | ||
"events": "^3.1.0", | ||
@@ -30,2 +32,3 @@ "express": "^4.16.4", | ||
"devDependencies": { | ||
"@types/crypto-js": "^4.0.1", | ||
"ts-node": "^8.0.2", | ||
@@ -32,0 +35,0 @@ "tslint": "^5.12.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
64270
422
10
4
1
+ Addedcrypto@^1.0.1
+ Addedcrypto-js@^4.0.0
+ Addedcrypto@1.0.1(transitive)
+ Addedcrypto-js@4.2.0(transitive)