kaven-utils
Advanced tools
Comparing version 2.0.7 to 2.0.8
@@ -7,6 +7,6 @@ /******************************************************************** | ||
* @create: 2018-08-25 08:19:55.120 | ||
* @modify: 2020-06-22 13:24:46.562 | ||
* @version: 2.0.6 | ||
* @times: 50 | ||
* @lines: 104 | ||
* @modify: 2020-07-11 09:17:40.791 | ||
* @version: 2.0.8 | ||
* @times: 53 | ||
* @lines: 105 | ||
* @copyright: Copyright © 2018-2020 Kaven. All Rights Reserved. | ||
@@ -64,3 +64,2 @@ * @description: Utils for Node.js. | ||
export * from "./src/KavenLog"; | ||
export * from "./src/KavenRSA"; | ||
export * from "./src/KavenSSO/KavenSSO"; | ||
@@ -70,2 +69,4 @@ export * from "./src/KavenSSO/KavenSSOServer"; | ||
export * from "./src/MailConfig"; | ||
export * from "./src/KavenCrypto"; | ||
export * from "./src/KavenRSA"; | ||
export * from "./src/KavenAuthenticate/KavenAuthentication"; | ||
@@ -72,0 +73,0 @@ export * from "./src/KavenAuthenticate/KavenBasicAuthentication"; |
11
index.js
@@ -8,6 +8,6 @@ "use strict"; | ||
* @create: 2018-08-25 08:19:55.120 | ||
* @modify: 2020-06-22 13:24:46.562 | ||
* @version: 2.0.6 | ||
* @times: 50 | ||
* @lines: 104 | ||
* @modify: 2020-07-11 09:17:40.791 | ||
* @version: 2.0.8 | ||
* @times: 53 | ||
* @lines: 105 | ||
* @copyright: Copyright © 2018-2020 Kaven. All Rights Reserved. | ||
@@ -71,3 +71,2 @@ * @description: Utils for Node.js. | ||
__exportStar(require("./src/KavenLog"), exports); | ||
__exportStar(require("./src/KavenRSA"), exports); | ||
__exportStar(require("./src/KavenSSO/KavenSSO"), exports); | ||
@@ -77,2 +76,4 @@ __exportStar(require("./src/KavenSSO/KavenSSOServer"), exports); | ||
__exportStar(require("./src/MailConfig"), exports); | ||
__exportStar(require("./src/KavenCrypto"), exports); | ||
__exportStar(require("./src/KavenRSA"), exports); | ||
__exportStar(require("./src/KavenAuthenticate/KavenAuthentication"), exports); | ||
@@ -79,0 +80,0 @@ __exportStar(require("./src/KavenAuthenticate/KavenBasicAuthentication"), exports); |
{ | ||
"name": "kaven-utils", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"description": "Utils for Node.js.", | ||
@@ -44,12 +44,9 @@ "main": "index", | ||
"file-type": "^14.6.2", | ||
"forever": "^3.0.0", | ||
"ftp": "^0.3.10", | ||
"iconv-lite": "^0.6.0", | ||
"iconv-lite": "^0.6.2", | ||
"jsonwebtoken": "^8.5.1", | ||
"jszip": "^3.5.0", | ||
"kaven-basic": "^2.0.7", | ||
"mkdirp": "^1.0.4", | ||
"kaven-basic": "^2.0.8", | ||
"morgan": "^1.10.0", | ||
"ncp": "^2.0.0", | ||
"node-rsa": "^1.0.8", | ||
"node-schedule": "^1.3.2", | ||
@@ -56,0 +53,0 @@ "nodemailer": "^6.4.10", |
@@ -7,6 +7,6 @@ /******************************************************************** | ||
* @create: 2018-08-30 13:24:44.049 | ||
* @modify: 2020-06-02 17:23:45.180 | ||
* @version: 2.0.5 | ||
* @times: 17 | ||
* @lines: 74 | ||
* @modify: 2020-07-08 13:58:28.887 | ||
* @version: 2.0.8 | ||
* @times: 18 | ||
* @lines: 75 | ||
* @copyright: Copyright © 2018-2020 Kaven. All Rights Reserved. | ||
@@ -20,4 +20,4 @@ * @description: [description] | ||
/** | ||
* @version 1.0.0 | ||
* @since 1.0.5 | ||
* @version 2020-07-08 | ||
*/ | ||
@@ -24,0 +24,0 @@ static readonly Logger: RequestHandler; |
@@ -8,6 +8,6 @@ "use strict"; | ||
* @create: 2018-08-30 13:24:44.049 | ||
* @modify: 2020-06-02 17:23:45.180 | ||
* @version: 2.0.5 | ||
* @times: 17 | ||
* @lines: 74 | ||
* @modify: 2020-07-08 13:58:28.887 | ||
* @version: 2.0.8 | ||
* @times: 18 | ||
* @lines: 75 | ||
* @copyright: Copyright © 2018-2020 Kaven. All Rights Reserved. | ||
@@ -38,4 +38,4 @@ * @description: [description] | ||
/** | ||
* @version 1.0.0 | ||
* @since 1.0.5 | ||
* @version 2020-07-08 | ||
*/ | ||
@@ -45,5 +45,6 @@ KavenCommon.Logger = morgan(function (tokens, req, res) { | ||
var log = [ | ||
"[" + KavenCommon.Chalk.green(kaven_basic_1.FormatDate()) + "][" + tokens.method(req, res) + "]", | ||
"[" + KavenCommon.Chalk.green(kaven_basic_1.FormatDate(undefined, kaven_basic_1.DateTimeFormat.FullDataTime)) + "][" + tokens.method(req, res) + "]", | ||
KavenCommon.Chalk.blue(tokens.url(req, res)), | ||
"[" + KavenUtility_1.GetColoredStatus(tokens.status(req, res)) + "]", | ||
"[" + req.ip + "]", | ||
tokens.res(req, res, "content-length"), | ||
@@ -50,0 +51,0 @@ "-", |
@@ -6,29 +6,34 @@ /******************************************************************** | ||
* @file: [Kaven-Utils] /src/KavenRSA.ts | ||
* @create: 2018-10-19 13:36:55.688 | ||
* @modify: 2020-06-02 17:23:45.184 | ||
* @version: 2.0.5 | ||
* @times: 14 | ||
* @lines: 75 | ||
* @copyright: Copyright © 2018-2020 Kaven. All Rights Reserved. | ||
* @create: 2020-07-10 13:39:53.988 | ||
* @modify: 2020-07-11 12:52:09.365 | ||
* @version: 2.0.8 | ||
* @times: 16 | ||
* @lines: 236 | ||
* @copyright: Copyright © 2020 Kaven. All Rights Reserved. | ||
* @description: [description] | ||
* @license: [license] | ||
********************************************************************/ | ||
/// <reference types="node" /> | ||
/** | ||
* | ||
* @version 1.1.17 | ||
* @since 2018-10-19 | ||
* crypto wrap | ||
* @since 2.0.8 | ||
* @version 2020-07-10 | ||
*/ | ||
export declare class KavenRSA { | ||
get Public(): string; | ||
get Private(): string; | ||
get KeySizeInBits(): number; | ||
get MaxMessageSizeInBytes(): number; | ||
private readonly publicKey; | ||
private readonly privateKey; | ||
get PublicKey(): string | undefined; | ||
get PrivateKey(): string | undefined; | ||
constructor(publicKey?: string, privateKey?: string); | ||
static Create(bits?: number, exponent?: number): KavenRSA; | ||
static CreateFromString(str: string): KavenRSA; | ||
static CreateFromFile(file: string): KavenRSA; | ||
private readonly nodeRSAInstance; | ||
Encrypt(data: string): string; | ||
Decrypt(encryptedData: string): string; | ||
Sign(data: string): string; | ||
Verify(signedData: string, signature: string): boolean; | ||
Encrypt(data: Buffer, padding?: number, oaepHash?: string): Buffer; | ||
Decrypt(data: Buffer, padding?: number, oaepHash?: string): Buffer; | ||
Sign(data: Buffer, algorithm?: string, padding?: number): Buffer; | ||
Verify(data: Buffer, signature: Buffer, algorithm?: string, padding?: number): boolean; | ||
EncryptToString<T>(data: T, encoding?: BufferEncoding, padding?: number, oaepHash?: string): string; | ||
DecryptFromString<T = any>(data: string, encoding?: BufferEncoding, padding?: number, oaepHash?: string): T; | ||
SignToString<T>(data: T, encoding?: BufferEncoding, algorithm?: string, padding?: number): string; | ||
VerifyFromString<T>(data: T, signature: string, encoding?: BufferEncoding, algorithm?: string, padding?: number): boolean; | ||
EncryptBigData<T>(data: T, encoding?: BufferEncoding, padding?: number, oaepHash?: string): string; | ||
DecryptBigData<T = any>(data: string, encoding?: BufferEncoding, padding?: number, oaepHash?: string): T; | ||
} |
@@ -7,8 +7,8 @@ "use strict"; | ||
* @file: [Kaven-Utils] /src/KavenRSA.ts | ||
* @create: 2018-10-19 13:36:55.688 | ||
* @modify: 2020-06-02 17:23:45.184 | ||
* @version: 2.0.5 | ||
* @times: 14 | ||
* @lines: 75 | ||
* @copyright: Copyright © 2018-2020 Kaven. All Rights Reserved. | ||
* @create: 2020-07-10 13:39:53.988 | ||
* @modify: 2020-07-11 12:52:09.365 | ||
* @version: 2.0.8 | ||
* @times: 16 | ||
* @lines: 236 | ||
* @copyright: Copyright © 2020 Kaven. All Rights Reserved. | ||
* @description: [description] | ||
@@ -19,16 +19,18 @@ * @license: [license] | ||
exports.KavenRSA = void 0; | ||
var fs_1 = require("fs"); | ||
var NodeRSA = require("node-rsa"); | ||
var crypto_1 = require("crypto"); | ||
var KavenCrypto_1 = require("./KavenCrypto"); | ||
var kaven_basic_1 = require("kaven-basic"); | ||
/** | ||
* | ||
* @version 1.1.17 | ||
* @since 2018-10-19 | ||
* crypto wrap | ||
* @since 2.0.8 | ||
* @version 2020-07-10 | ||
*/ | ||
var KavenRSA = /** @class */ (function () { | ||
function KavenRSA() { | ||
this.nodeRSAInstance = new NodeRSA(); | ||
function KavenRSA(publicKey, privateKey) { | ||
this.publicKey = publicKey; | ||
this.privateKey = privateKey; | ||
} | ||
Object.defineProperty(KavenRSA.prototype, "Public", { | ||
Object.defineProperty(KavenRSA.prototype, "PublicKey", { | ||
get: function () { | ||
return this.nodeRSAInstance.exportKey("public"); | ||
return this.publicKey; | ||
}, | ||
@@ -38,5 +40,5 @@ enumerable: false, | ||
}); | ||
Object.defineProperty(KavenRSA.prototype, "Private", { | ||
Object.defineProperty(KavenRSA.prototype, "PrivateKey", { | ||
get: function () { | ||
return this.nodeRSAInstance.exportKey("private"); | ||
return this.privateKey; | ||
}, | ||
@@ -46,45 +48,119 @@ enumerable: false, | ||
}); | ||
Object.defineProperty(KavenRSA.prototype, "KeySizeInBits", { | ||
get: function () { | ||
return this.nodeRSAInstance.getKeySize(); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
Object.defineProperty(KavenRSA.prototype, "MaxMessageSizeInBytes", { | ||
get: function () { | ||
return this.nodeRSAInstance.getMaxMessageSize(); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
KavenRSA.Create = function (bits, exponent) { | ||
if (bits === void 0) { bits = 4096; } | ||
if (exponent === void 0) { exponent = 65537; } | ||
var instance = new KavenRSA(); | ||
instance.nodeRSAInstance.generateKeyPair(bits, exponent); | ||
return instance; | ||
var keys = crypto_1.generateKeyPairSync("rsa", { | ||
modulusLength: bits, | ||
publicExponent: exponent, | ||
}); | ||
var publicKey = keys.publicKey.export({ | ||
type: "pkcs1", | ||
format: "pem", | ||
}).toString(); | ||
var privateKey = keys.privateKey.export({ | ||
type: "pkcs8", | ||
format: "pem", | ||
}).toString(); | ||
return new KavenRSA(publicKey, privateKey); | ||
}; | ||
KavenRSA.CreateFromString = function (str) { | ||
var instance = new KavenRSA(); | ||
instance.nodeRSAInstance.importKey(str); | ||
return instance; | ||
// #region Core Methods | ||
KavenRSA.prototype.Encrypt = function (data, padding, oaepHash) { | ||
if (padding === void 0) { padding = crypto_1.constants.RSA_PKCS1_OAEP_PADDING; } | ||
if (oaepHash === void 0) { oaepHash = "sha256"; } | ||
if (this.publicKey === undefined) { | ||
throw new Error("publicKey is undefined"); | ||
} | ||
return crypto_1.publicEncrypt({ | ||
key: this.publicKey, | ||
padding: padding, | ||
oaepHash: oaepHash, | ||
}, data); | ||
}; | ||
KavenRSA.CreateFromFile = function (file) { | ||
return KavenRSA.CreateFromString(fs_1.readFileSync(file, "utf8")); | ||
KavenRSA.prototype.Decrypt = function (data, padding, oaepHash) { | ||
if (padding === void 0) { padding = crypto_1.constants.RSA_PKCS1_OAEP_PADDING; } | ||
if (oaepHash === void 0) { oaepHash = "sha256"; } | ||
if (this.privateKey === undefined) { | ||
throw new Error("privateKey is undefined"); | ||
} | ||
return crypto_1.privateDecrypt({ | ||
key: this.privateKey, | ||
padding: padding, | ||
oaepHash: oaepHash, | ||
}, data); | ||
}; | ||
KavenRSA.prototype.Encrypt = function (data) { | ||
return this.nodeRSAInstance.encrypt(data, "base64"); | ||
KavenRSA.prototype.Sign = function (data, algorithm, padding) { | ||
if (algorithm === void 0) { algorithm = "sha256"; } | ||
if (padding === void 0) { padding = crypto_1.constants.RSA_PKCS1_PSS_PADDING; } | ||
if (this.privateKey === undefined) { | ||
throw new Error("privateKey is undefined"); | ||
} | ||
return crypto_1.sign(algorithm, data, { | ||
key: this.privateKey, | ||
padding: padding, | ||
}); | ||
}; | ||
KavenRSA.prototype.Decrypt = function (encryptedData) { | ||
return this.nodeRSAInstance.decrypt(encryptedData).toString("utf8"); | ||
KavenRSA.prototype.Verify = function (data, signature, algorithm, padding) { | ||
if (algorithm === void 0) { algorithm = "sha256"; } | ||
if (padding === void 0) { padding = crypto_1.constants.RSA_PKCS1_PSS_PADDING; } | ||
if (this.publicKey === undefined) { | ||
throw new Error("publicKey is undefined"); | ||
} | ||
var k = crypto_1.createPublicKey({ | ||
key: this.publicKey, | ||
}); | ||
k.padding = padding; | ||
return crypto_1.verify(algorithm, data, k, signature); | ||
}; | ||
KavenRSA.prototype.Sign = function (data) { | ||
return this.nodeRSAInstance.sign(data, "base64"); | ||
// #endregion | ||
// #region Helper Methods | ||
KavenRSA.prototype.EncryptToString = function (data, encoding, padding, oaepHash) { | ||
if (encoding === void 0) { encoding = "base64"; } | ||
if (padding === void 0) { padding = crypto_1.constants.RSA_PKCS1_OAEP_PADDING; } | ||
if (oaepHash === void 0) { oaepHash = "sha256"; } | ||
return this.Encrypt(Buffer.from(JSON.stringify(data)), padding, oaepHash).toString(encoding); | ||
}; | ||
KavenRSA.prototype.Verify = function (signedData, signature) { | ||
return this.nodeRSAInstance.verify(signedData, signature, undefined, "base64"); | ||
KavenRSA.prototype.DecryptFromString = function (data, encoding, padding, oaepHash) { | ||
if (encoding === void 0) { encoding = "base64"; } | ||
if (padding === void 0) { padding = crypto_1.constants.RSA_PKCS1_OAEP_PADDING; } | ||
if (oaepHash === void 0) { oaepHash = "sha256"; } | ||
return JSON.parse(this.Decrypt(Buffer.from(data, encoding), padding, oaepHash).toString()); | ||
}; | ||
KavenRSA.prototype.SignToString = function (data, encoding, algorithm, padding) { | ||
if (encoding === void 0) { encoding = "base64"; } | ||
if (algorithm === void 0) { algorithm = "sha256"; } | ||
if (padding === void 0) { padding = crypto_1.constants.RSA_PKCS1_PSS_PADDING; } | ||
return this.Sign(Buffer.from(JSON.stringify(data)), algorithm, padding).toString(encoding); | ||
}; | ||
KavenRSA.prototype.VerifyFromString = function (data, signature, encoding, algorithm, padding) { | ||
if (encoding === void 0) { encoding = "base64"; } | ||
if (algorithm === void 0) { algorithm = "sha256"; } | ||
if (padding === void 0) { padding = crypto_1.constants.RSA_PKCS1_PSS_PADDING; } | ||
return this.Verify(Buffer.from(JSON.stringify(data)), Buffer.from(signature, encoding), algorithm, padding); | ||
}; | ||
KavenRSA.prototype.EncryptBigData = function (data, encoding, padding, oaepHash) { | ||
if (encoding === void 0) { encoding = "base64"; } | ||
if (padding === void 0) { padding = crypto_1.constants.RSA_PKCS1_OAEP_PADDING; } | ||
if (oaepHash === void 0) { oaepHash = "sha256"; } | ||
var password = KavenCrypto_1.GenerateEncryptPassword(); | ||
var dataStr = JSON.stringify(data); | ||
var encryptedData = KavenCrypto_1.EncryptString(dataStr, password); | ||
var encryptedPassword = this.EncryptToString(password, encoding, padding, oaepHash); | ||
return kaven_basic_1.StringArray2String(encryptedData, encryptedPassword); | ||
}; | ||
KavenRSA.prototype.DecryptBigData = function (data, encoding, padding, oaepHash) { | ||
if (encoding === void 0) { encoding = "base64"; } | ||
if (padding === void 0) { padding = crypto_1.constants.RSA_PKCS1_OAEP_PADDING; } | ||
if (oaepHash === void 0) { oaepHash = "sha256"; } | ||
var items = kaven_basic_1.String2StringArray(data); | ||
if (items && items.length === 2) { | ||
var encryptedData = items[0]; | ||
var encryptedPassword = items[1]; | ||
var password = this.DecryptFromString(encryptedPassword, encoding, padding, oaepHash); | ||
var dataStr = KavenCrypto_1.DecryptString(encryptedData, password); | ||
return JSON.parse(dataStr); | ||
} | ||
throw new Error("DecryptBigData failed"); | ||
}; | ||
return KavenRSA; | ||
}()); | ||
exports.KavenRSA = KavenRSA; |
@@ -7,6 +7,6 @@ /******************************************************************** | ||
* @create: 2018-08-25 08:19:55.120 | ||
* @modify: 2020-07-06 16:12:47.455 | ||
* @version: 2.0.7 | ||
* @times: 184 | ||
* @lines: 2187 | ||
* @modify: 2020-07-11 12:52:09.367 | ||
* @version: 2.0.8 | ||
* @times: 199 | ||
* @lines: 2006 | ||
* @copyright: Copyright © 2018-2020 Kaven. All Rights Reserved. | ||
@@ -35,13 +35,11 @@ * @description: Utils for Node.js. | ||
import AnsiUp from "ansi_up"; | ||
import * as chalk from "chalk"; | ||
import { ExecOptions, SpawnOptionsWithoutStdio } from "child_process"; | ||
import { FileTypeResult } from "file-type"; | ||
import * as JWT from "jsonwebtoken"; | ||
import * as schedule from "node-schedule"; | ||
import * as pem from "pem"; | ||
import { IndexObject, LogLevel, MailOption } from "kaven-basic"; | ||
import { Options as ncpOptions } from "ncp"; | ||
import { Job } from "node-schedule"; | ||
import { CertificateCreationOptions, CertificateCreationResult } from "pem"; | ||
import { IExecOptions, IExternalIPRule, IHTTPResponse } from "./Interfaces"; | ||
import { MailConfig } from "./MailConfig"; | ||
export declare type Job = schedule.Job; | ||
/** | ||
@@ -61,3 +59,3 @@ * @since 1.1.21 | ||
*/ | ||
export declare const Chalk: chalk.Chalk; | ||
export declare const Chalk: import("chalk").Chalk; | ||
/** | ||
@@ -107,7 +105,2 @@ * @since IExternalIPRule | ||
/** | ||
* @version 1.0.1 | ||
* @since 1.0.5 | ||
*/ | ||
export declare function FindLogFile(): Promise<string>; | ||
/** | ||
* 2019-08-05: | ||
@@ -124,9 +117,9 @@ * remove default value "./data/logs/" for `backupFolder`; | ||
/** | ||
* | ||
* @param file | ||
* @param html | ||
* @version 1.0.1 | ||
* @since 1.0.5 | ||
* 2019-08-05: | ||
* add param: `logFile` | ||
* @param overBytes | ||
* @since 1.0.9 | ||
* @version 2020-07-11 | ||
*/ | ||
export declare function GetLogContent(file?: string, html?: boolean): Promise<any>; | ||
export declare function ResetLogFileIf(overBytes?: number, logFile?: string): Promise<boolean>; | ||
/** | ||
@@ -291,3 +284,3 @@ * | ||
*/ | ||
export declare function StartSchedule(func: () => void, year?: number | number[], month?: number | number[], date?: number | number[], dayOfWeek?: number | number[], hour?: number | number[], minute?: number | number[], second?: number | number[]): schedule.Job; | ||
export declare function StartSchedule(func: () => void, year?: number | number[], month?: number | number[], date?: number | number[], dayOfWeek?: number | number[], hour?: number | number[], minute?: number | number[], second?: number | number[]): Job; | ||
/** | ||
@@ -300,3 +293,3 @@ * | ||
*/ | ||
export declare function StartScheduleLikeCron(func: () => void, rule: string): schedule.Job; | ||
export declare function StartScheduleLikeCron(func: () => void, rule: string): Job; | ||
/** | ||
@@ -338,9 +331,9 @@ * | ||
* @export | ||
* @param {pem.CertificateCreationOptions} [options={ days: 1, selfSigned: true }] | ||
* @param {CertificateCreationOptions} [options={ days: 1, selfSigned: true }] | ||
* @returns | ||
* @see {@link https://www.deineagentur.com/projects/pem/module-pem.html#.createCertificate} | ||
* @see {@link https://www.deineagentur.com/projects/pem/module-html#.createCertificate} | ||
* @version 1.0.0 | ||
* @since 1.0.6 | ||
*/ | ||
export declare function CreateCertificate(options?: pem.CertificateCreationOptions): Promise<pem.CertificateCreationResult>; | ||
export declare function CreateCertificate(options?: CertificateCreationOptions): Promise<CertificateCreationResult>; | ||
/** | ||
@@ -410,14 +403,6 @@ * | ||
/** | ||
* 2019-08-05: | ||
* add param: `logFile` | ||
* @param overBytes | ||
* @version 1.0.0 | ||
* @since 1.0.9 | ||
*/ | ||
export declare function ResetLogFileIf(overBytes?: number, logFile?: string): Promise<boolean>; | ||
/** | ||
* | ||
* @param dir | ||
* @version 1.0.0 | ||
* @since 1.0.9 | ||
* @version 2020-07-11 | ||
*/ | ||
@@ -428,6 +413,6 @@ export declare function MakeDirectory(dir: string): Promise<string | undefined>; | ||
* @param dir | ||
* @version 1.0.0 | ||
* @since 1.0.9 | ||
* @version 2020-07-11 | ||
*/ | ||
export declare function MakeDirectorySync(dir: string): string | undefined; | ||
export declare function MakeDirectorySync(dir: string): string; | ||
/** | ||
@@ -627,5 +612,5 @@ * | ||
/** | ||
* Simple wrap for fs.existsSync | ||
* Simple wrap for existsSync | ||
* @param fullPath | ||
* @see https://nodejs.org/docs/latest-v8.x/api/fs.html#fs_fs_existssync_path | ||
* @see https://nodejs.org/docs/latest-v8.x/api/html#fs_fs_existssync_path | ||
* @since 1.1.20 | ||
@@ -677,29 +662,1 @@ * @since 2018-10-28 | ||
export declare function InitializeTextLogger(stdoutFile: string, stderrFile: string): void; | ||
/** | ||
* | ||
* @param strArray | ||
*/ | ||
export declare function StringArray2String(strArray: string[]): string; | ||
/** | ||
* | ||
* @param str | ||
*/ | ||
export declare function String2StringArray(str: string): string[] | undefined; | ||
/** | ||
* | ||
*/ | ||
export declare function GenerateEncryptPassword(keySize?: number, ivSize?: number): string; | ||
/** | ||
* | ||
* @param str some clear text data | ||
* @param password Password used to generate key | ||
* @param algorithm | ||
*/ | ||
export declare function EncryptString(str: string, password: string, algorithm?: string): string | undefined; | ||
/** | ||
* | ||
* @param encryptedStr | ||
* @param password Password used to generate key | ||
* @param algorithm | ||
*/ | ||
export declare function DecryptString(encryptedStr: string, password: string, algorithm?: string): string | undefined; |
Sorry, the diff of this file is too big to display
220508
17
40
6
5586
- Removedforever@^3.0.0
- Removedmkdirp@^1.0.4
- Removednode-rsa@^1.0.8
- Removedansi-regex@2.1.1(transitive)
- Removedanymatch@2.0.0(transitive)
- Removedarr-diff@4.0.0(transitive)
- Removedarr-flatten@1.1.0(transitive)
- Removedarr-union@3.1.0(transitive)
- Removedarray-unique@0.3.2(transitive)
- Removedasn1@0.2.6(transitive)
- Removedassign-symbols@1.0.0(transitive)
- Removedasync@0.2.100.2.91.5.2(transitive)
- Removedasync-each@1.0.6(transitive)
- Removedatob@2.1.2(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbase@0.11.2(transitive)
- Removedbinary-extensions@1.13.1(transitive)
- Removedbindings@1.5.0(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedbraces@2.3.2(transitive)
- Removedbroadway@0.3.6(transitive)
- Removedcache-base@1.0.1(transitive)
- Removedcaller@1.1.0(transitive)
- Removedcamelcase@2.1.1(transitive)
- Removedchokidar@2.1.8(transitive)
- Removedclass-utils@0.3.6(transitive)
- Removedcliff@0.1.100.1.9(transitive)
- Removedcliui@3.2.0(transitive)
- Removedclone@2.1.2(transitive)
- Removedcode-point-at@1.1.0(transitive)
- Removedcollection-visit@1.0.0(transitive)
- Removedcolors@0.6.21.0.31.4.0(transitive)
- Removedcomponent-emitter@1.3.1(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedcopy-descriptor@0.1.1(transitive)
- Removedcycle@1.0.3(transitive)
- Removeddecode-uri-component@0.2.2(transitive)
- Removeddeep-equal@1.1.2(transitive)
- Removeddefine-property@0.2.51.0.02.0.2(transitive)
- Removeddirector@1.2.7(transitive)
- Removedeventemitter2@0.4.146.4.3(transitive)
- Removedexpand-brackets@2.1.4(transitive)
- Removedextend-shallow@2.0.13.0.2(transitive)
- Removedextglob@2.0.4(transitive)
- Removedeyes@0.1.8(transitive)
- Removedfile-uri-to-path@1.0.0(transitive)
- Removedfill-range@4.0.0(transitive)
- Removedflatiron@0.4.3(transitive)
- Removedfor-in@1.0.2(transitive)
- Removedforever@3.0.4(transitive)
- Removedforever-monitor@3.0.3(transitive)
- Removedfragment-cache@0.2.1(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedfsevents@1.2.13(transitive)
- Removedfunctions-have-names@1.2.3(transitive)
- Removedget-value@2.0.6(transitive)
- Removedglob@7.2.3(transitive)
- Removedglob-parent@3.1.0(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedhas-value@0.3.11.0.0(transitive)
- Removedhas-values@0.1.41.0.0(transitive)
- Removedi@0.3.7(transitive)
- Removedinflight@1.0.6(transitive)
- Removedini@1.3.8(transitive)
- Removedinvert-kv@1.0.0(transitive)
- Removedis-accessor-descriptor@1.0.1(transitive)
- Removedis-arguments@1.1.1(transitive)
- Removedis-binary-path@1.0.1(transitive)
- Removedis-data-descriptor@1.0.1(transitive)
- Removedis-date-object@1.0.5(transitive)
- Removedis-descriptor@0.1.71.0.3(transitive)
- Removedis-extendable@0.1.11.0.1(transitive)
- Removedis-extglob@2.1.1(transitive)
- Removedis-fullwidth-code-point@1.0.0(transitive)
- Removedis-glob@3.1.04.0.3(transitive)
- Removedis-number@3.0.0(transitive)
- Removedis-plain-object@2.0.4(transitive)
- Removedis-regex@1.1.4(transitive)
- Removedis-windows@1.0.2(transitive)
- Removedisobject@2.1.03.0.1(transitive)
- Removedisstream@0.1.2(transitive)
- Removedkind-of@3.2.24.0.06.0.3(transitive)
- Removedlazy@1.0.11(transitive)
- Removedlcid@1.0.0(transitive)
- Removedmap-cache@0.2.2(transitive)
- Removedmap-visit@1.0.0(transitive)
- Removedmicromatch@3.1.10(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedminimist@0.0.101.2.8(transitive)
- Removedmixin-deep@1.3.2(transitive)
- Removedmkdirp@0.5.61.0.4(transitive)
- Removedmute-stream@0.0.8(transitive)
- Removednan@2.20.0(transitive)
- Removednanomatch@1.2.13(transitive)
- Removednconf@0.10.00.6.9(transitive)
- Removedncp@0.4.2(transitive)
- Removednode-rsa@1.1.1(transitive)
- Removednormalize-path@2.1.13.0.0(transitive)
- Removednssocket@0.6.0(transitive)
- Removednumber-is-nan@1.0.1(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedobject-copy@0.1.0(transitive)
- Removedobject-is@1.1.6(transitive)
- Removedobject-visit@1.0.1(transitive)
- Removedobject.pick@1.3.0(transitive)
- Removedoptimist@0.6.0(transitive)
- Removedos-locale@1.4.0(transitive)
- Removedpascalcase@0.1.1(transitive)
- Removedpath-dirname@1.0.2(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedpkginfo@0.3.1(transitive)
- Removedposix-character-classes@0.1.1(transitive)
- Removedprettyjson@1.2.5(transitive)
- Removedprompt@0.2.14(transitive)
- Removedps-tree@1.2.0(transitive)
- Removedread@1.0.7(transitive)
- Removedreaddirp@2.2.1(transitive)
- Removedregex-not@1.0.2(transitive)
- Removedregexp.prototype.flags@1.5.2(transitive)
- Removedremove-trailing-separator@1.1.0(transitive)
- Removedrepeat-element@1.1.4(transitive)
- Removedrepeat-string@1.6.1(transitive)
- Removedresolve-url@0.2.1(transitive)
- Removedret@0.1.15(transitive)
- Removedrevalidator@0.1.8(transitive)
- Removedrimraf@2.7.1(transitive)
- Removedsafe-regex@1.1.0(transitive)
- Removedsecure-keys@1.0.0(transitive)
- Removedset-function-name@2.0.2(transitive)
- Removedset-value@2.0.1(transitive)
- Removedshush@1.0.4(transitive)
- Removedsnapdragon@0.8.2(transitive)
- Removedsnapdragon-node@2.1.1(transitive)
- Removedsnapdragon-util@3.0.1(transitive)
- Removedsource-map@0.5.7(transitive)
- Removedsource-map-resolve@0.5.3(transitive)
- Removedsource-map-url@0.4.1(transitive)
- Removedsplit-string@3.1.0(transitive)
- Removedstack-trace@0.0.10(transitive)
- Removedstatic-extend@0.1.2(transitive)
- Removedstring-width@1.0.2(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedstrip-json-comments@3.1.1(transitive)
- Removedto-object-path@0.3.0(transitive)
- Removedto-regex@3.0.2(transitive)
- Removedto-regex-range@2.1.1(transitive)
- Removedunion-value@1.0.1(transitive)
- Removedunset-value@1.0.0(transitive)
- Removedupath@1.2.0(transitive)
- Removedurix@0.1.0(transitive)
- Removeduse@3.1.1(transitive)
- Removedutile@0.2.1(transitive)
- Removedwindow-size@0.1.4(transitive)
- Removedwinston@0.8.00.8.3(transitive)
- Removedwordwrap@0.0.3(transitive)
- Removedwrap-ansi@2.1.0(transitive)
- Removedy18n@3.2.2(transitive)
- Removedyargs@3.32.0(transitive)
Updatediconv-lite@^0.6.2
Updatedkaven-basic@^2.0.8