@api-encrypt/sdk
Advanced tools
Comparing version 0.0.10 to 0.0.11
{ | ||
"name": "@api-encrypt/sdk", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"type": "commonjs", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -21,3 +21,3 @@ export interface ISecret { | ||
message: any; | ||
data: string; | ||
data: any; | ||
}>; |
@@ -90,3 +90,3 @@ "use strict"; | ||
const loadDataFromAPIEncrypt = (params) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { | ||
console.log('loadDataFromAPIEncrypt: ', params); | ||
// console.log('loadDataFromAPIEncrypt: ', params); | ||
const { url, clientId, onTimeKey, encodedSecretKeys, userSecret } = params; | ||
@@ -124,5 +124,5 @@ let data, message, encryptedSecretKey, secretEncrypted, dataEncodedFromDb, dataDecrypted; | ||
} | ||
console.log('secretEncrypted: ', secretEncrypted); | ||
// console.log('secretEncrypted: ', secretEncrypted); | ||
// get data from db | ||
console.log('Get data from db data: ', data, { key: encryptedSecretKey }, onTimeKey); | ||
// console.log('Get data from db data: ', data, {key: encryptedSecretKey }, onTimeKey); | ||
try { | ||
@@ -134,3 +134,3 @@ dataEncodedFromDb = yield (0, exports.getAesSecretValue)(data, { key: encryptedSecretKey }, onTimeKey); | ||
} | ||
console.log('dataEncryptedFromDb >>', JSON.parse(dataEncodedFromDb)); | ||
// console.log('dataEncryptedFromDb >>',JSON.parse(dataEncodedFromDb)); | ||
// decrypt data with secretEncrypted & userSecret | ||
@@ -143,7 +143,7 @@ try { | ||
} | ||
console.log('dataEncryptedFromDb >>', data); | ||
console.log('dataDecrypted >>', dataDecrypted); | ||
// console.log('dataEncryptedFromDb >>',data); | ||
// console.log('dataDecrypted >>', dataDecrypted); | ||
return { | ||
message, | ||
data: dataDecrypted | ||
data: JSON.parse(dataDecrypted) | ||
}; | ||
@@ -150,0 +150,0 @@ }); |
Sorry, the diff of this file is not supported yet
13442