@marklb/crypto-utils
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -93,3 +93,1 @@ "use strict"; | ||
exports.CryptoUtilsPrivateKey = CryptoUtilsPrivateKey; | ||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jcnlwdG8tdXRpbHMtcHJpdmF0ZS1rZXkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxxRUFBZ0U7QUFDaEUsNkRBQTRFO0FBRTVFLHVDQUFpQztBQUNqQyw4QkFBK0I7QUFDL0IsMkNBQW9DO0FBRXBDLElBQU0sRUFBRSxHQUFHLEdBQUcsQ0FBQyxFQUFFLENBQUE7QUFDakIsSUFBTSxFQUFFLEdBQUcsSUFBSSxFQUFFLENBQUMsV0FBVyxDQUFDLENBQUE7QUFFOUI7SUFFRSwrQkFDVSxTQUF3QjtRQUF4QiwwQkFBQSxFQUFBLGdCQUF3QjtRQUF4QixjQUFTLEdBQVQsU0FBUyxDQUFlO1FBRWhDLElBQUksSUFBSSxDQUFDLFNBQVMsS0FBSyxJQUFJLEVBQUU7WUFDM0IsSUFBSSxDQUFDLFNBQVMsR0FBRyxxQkFBcUIsQ0FBQyxVQUFVLEVBQUUsQ0FBQyxVQUFVLENBQUE7U0FDL0Q7YUFBTSxJQUFJLElBQUksQ0FBQyxTQUFTLENBQUMsTUFBTSxLQUFLLHFDQUFlLEVBQUU7WUFDcEQsTUFBTSxJQUFJLEtBQUssQ0FBQyxvREFBa0QscUNBQWUsOEJBQTJCLENBQUMsQ0FBQTtTQUM5RztJQUNILENBQUM7SUFFRDs7O09BR0c7SUFDVyxnQ0FBVSxHQUF4QixVQUF5QixTQUFpQjtRQUN4QyxPQUFPLElBQUkscUJBQXFCLENBQUMsU0FBUyxDQUFDLENBQUE7SUFDN0MsQ0FBQztJQUVEOzs7O09BSUc7SUFDVyxnQ0FBVSxHQUF4QixVQUF5QixVQUFrQjt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uIHtcclxuICAgICAgcHJpdmF0ZUtleTogdGhpcy50b0J1ZmZlcigpLFxyXG4gICAgICBwdWJsaWNLZXk6IHRoaXMuZ2V0UHVibGljKCkudG9CdWZmZXIoY29tcHJlc3NlZClcclxuICAgIH1cclxuICB9XHJcblxyXG59XHJcbiJdfQ== |
@@ -110,3 +110,1 @@ "use strict"; | ||
exports.CryptoUtilsPublicKey = CryptoUtilsPublicKey; | ||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jcnlwdG8tdXRpbHMtcHVibGljLWtleS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDZEQUU4QjtBQUU5Qix1Q0FBaUM7QUFDakMsMEJBQTJCO0FBQzNCLDhCQUErQjtBQUMvQiwyQ0FBb0M7QUFFcEMsSUFBTSxFQUFFLEdBQUcsR0FBRyxDQUFDLEVBQUUsQ0FBQTtBQUNqQixJQUFNLEVBQUUsR0FBRyxJQUFJLEVBQUUsQ0FBQyxXQUFXLENBQUMsQ0FBQTtBQUU5QjtJQUVFLDhCQUNVLFNBQWlCO1FBQWpCLGNBQVMsR0FBVCxTQUFTLENBQVE7UUFFekIsSUFBSSxDQUFDLG9CQUFvQixDQUFDLGdCQUFnQixDQUFDLFNBQVMsQ0FBQyxFQUFFO1lBQ3JELE1BQU0sSUFBSSxLQUFLLENBQUMsbURBQWlELG9DQUFjLFlBQU8sK0NBQXlCLDBDQUF1QyxDQUFDLENBQUE7U0FDeEo7SUFDSCxDQUFDO0lBRUQ7OztPQUdHO0lBQ1csK0JBQVUsR0FBeEIsVUFBeUIsTUFBYztRQUNyQyxPQUFPLElBQUksb0JBQW9CLENBQUMsTUFBTSxDQUFDLENBQUE7SUFDekMsQ0FBQztJQUVEOzs7O09BSUc7SUFDVyxtQ0FBYyxHQUE1QixVQUE2QixPQUFlO1FBQzFDLElBQUksT0FBTyxDQUFDLE1BQU0sS0FBSyx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import { ICryptoUtilsEncryptionProps } from './crypto-utils.models'; | ||
export declare class CryptoUtils { | ||
constructor(); | ||
/** | ||
* Sign data | ||
* | ||
* @param privateKey | ||
* @param data | ||
*/ | ||
static sign(privateKey: Buffer, data: Buffer): Promise<string>; | ||
/** | ||
* Verify message | ||
* | ||
* @param publicKey | ||
* @param message | ||
* @param signature | ||
*/ | ||
static verify(publicKey: Buffer, message: Buffer, signature: Buffer): Promise<boolean>; | ||
/** | ||
* Encrypt | ||
* | ||
* @param publicKey | ||
* @param data | ||
*/ | ||
static encrypt(publicKey: Buffer, msg: Buffer): Promise<Buffer>; | ||
/** | ||
* Decrypt | ||
* | ||
* @param privateKey | ||
* @param data | ||
*/ | ||
static decrypt(privateKey: Buffer, encryptedData: Buffer): Promise<Buffer>; | ||
static serializeEncryptionProperties(encProps: ICryptoUtilsEncryptionProps): Buffer; | ||
static deserializeEncryptionProperties(encPropsBuf: Buffer): ICryptoUtilsEncryptionProps; | ||
static getCiphertext(encPropsBuf: Buffer): Buffer; | ||
static getEphemeralPublicKey(encPropsBuf: Buffer): Buffer; | ||
static getIV(encPropsBuf: Buffer): Buffer; | ||
static getHMAC(encPropsBuf: Buffer): Buffer; | ||
} | ||
//# sourceMappingURL=crypto-utils.d.ts.map |
@@ -165,3 +165,1 @@ "use strict"; | ||
exports.CryptoUtils = CryptoUtils; | ||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jcnlwdG8tdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLG1DQUFvQztBQUNwQywyQ0FBb0M7QUFFcEMsNkRBQXNIO0FBRXRIO0lBRUU7SUFBZ0IsQ0FBQztJQUVqQjs7Ozs7T0FLRztJQUNpQixnQkFBSSxHQUF4QixVQUF5QixVQUFrQixFQUFF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ZnNldCArIEVQSEVNX1BVQktFWV9MRU4pXHJcbiAgICByZXR1cm4gYnVmXHJcbiAgfVxyXG5cclxuICBwdWJsaWMgc3RhdGljIGdldElWKGVuY1Byb3BzQnVmOiBCdWZmZXIpOiBCdWZmZXIge1xyXG4gICAgY29uc3QgY2lwaGVydGV4dExlbiA9IGVuY1Byb3BzQnVmLmxlbmd0aCAtIEtFWV9QUk9QU19MRU5cclxuICAgIGNvbnN0IGJ1ZiA9IEJ1ZmZlci5hbGxvY1Vuc2FmZShJVl9MRU4pXHJcbiAgICBjb25zdCBvZmZzZXQgPSBjaXBoZXJ0ZXh0TGVuICsgRVBIRU1fUFVCS0VZX0xFTlxyXG4gICAgZW5jUHJvcHNCdWYuY29weShidWYsIDAsIG9mZnNldCwgb2Zmc2V0ICsgSVZfTEVOKVxyXG4gICAgcmV0dXJuIGJ1ZlxyXG4gIH1cclxuXHJcbiAgcHVibGljIHN0YXRpYyBnZXRITUFDKGVuY1Byb3BzQnVmOiBCdWZmZXIpOiBCdWZmZXIge1xyXG4gICAgY29uc3QgY2lwaGVydGV4dExlbiA9IGVuY1Byb3BzQnVmLmxlbmd0aCAtIEtFWV9QUk9QU19MRU5cclxuICAgIGNvbnN0IGJ1ZiA9IEJ1ZmZlci5hbGxvY1Vuc2FmZShITUFDX0xFTilcclxuICAgIGNvbnN0IG9mZnNldCA9IGNpcGhlcnRleHRMZW4gKyBFUEhFTV9QVUJLRVlfTEVOICsgSVZfTEVOXHJcbiAgICBlbmNQcm9wc0J1Zi5jb3B5KGJ1ZiwgMCwgb2Zmc2V0LCBvZmZzZXQgKyBITUFDX0xFTilcclxuICAgIHJldHVybiBidWZcclxuICB9XHJcblxyXG59XHJcbiJdfQ== |
@@ -10,3 +10,1 @@ "use strict"; | ||
exports.PUBLIC_KEY_COMPRESSED_LEN = 33; | ||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jcnlwdG8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XRpbHNFbmNyeXB0aW9uUHJvcHMge1xyXG4gIGNpcGhlcnRleHQ6IEJ1ZmZlcixcclxuICBlcGhlbVB1YmxpY0tleTogQnVmZmVyLFxyXG4gIGl2OiBCdWZmZXIsXHJcbiAgbWFjOiBCdWZmZXJcclxufVxyXG4iXX0= |
@@ -10,3 +10,1 @@ "use strict"; | ||
__export(require("./crypto-utils")); | ||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLGdEQUEwQztBQUMxQywrQ0FBeUM7QUFDekMsMkNBQXFDO0FBQ3JDLG9DQUE4QiIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY3J5cHRvLXV0aWxzLXByaXZhdGUta2V5J1xyXG5leHBvcnQgKiBmcm9tICcuL2NyeXB0by11dGlscy1wdWJsaWMta2V5J1xyXG5leHBvcnQgKiBmcm9tICcuL2NyeXB0by11dGlscy5tb2RlbHMnXHJcbmV4cG9ydCAqIGZyb20gJy4vY3J5cHRvLXV0aWxzJ1xyXG4iXX0= |
{ | ||
"name": "@marklb/crypto-utils", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
30948
843