namirasoft-core
Advanced tools
Comparing version 1.2.5 to 1.2.6
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SignOperation = void 0; | ||
const md5_1 = __importDefault(require("md5")); | ||
const crypto = __importStar(require("crypto")); | ||
class SignOperation { | ||
@@ -13,3 +33,5 @@ static sign(key, values) { | ||
message += "-" + values[i]; | ||
return (0, md5_1.default)(message); | ||
const hash = crypto.createHash('sha256'); | ||
hash.update(message); | ||
return hash.digest('hex'); | ||
} | ||
@@ -16,0 +38,0 @@ static isValid(key, values, signature) { |
{ | ||
"name": "namirasoft-core", | ||
"description": "Namira Software Corporation Core NPM Package", | ||
"version": "1.2.5", | ||
"version": "1.2.6", | ||
"main": "./dist/index.js", | ||
@@ -12,4 +12,4 @@ "types": "./dist/index.d.ts", | ||
"@types/md5": "^2.3.5", | ||
"@types/node": "^20.10.6", | ||
"axios": "^1.6.3", | ||
"@types/node": "^20.11.24", | ||
"axios": "^1.6.7", | ||
"md5": "^2.3.0", | ||
@@ -16,0 +16,0 @@ "moment": "^2.30.1", |
@@ -1,2 +0,2 @@ | ||
import md5 from 'md5'; | ||
import * as crypto from 'crypto'; | ||
export class SignOperation | ||
@@ -9,3 +9,5 @@ { | ||
message += "-" + values[i]; | ||
return md5(message); | ||
const hash = crypto.createHash('sha256'); | ||
hash.update(message); | ||
return hash.digest('hex'); | ||
} | ||
@@ -12,0 +14,0 @@ static isValid(key: string, values: any, signature: string) |
Sorry, the diff of this file is not supported yet
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
227561
3367
Updated@types/node@^20.11.24
Updatedaxios@^1.6.7