@tkey/storage-layer-torus
Advanced tools
Comparing version 11.0.2 to 11.0.3
@@ -201,2 +201,5 @@ /******/ (() => { // webpackBootstrap | ||
const http_helpers_namespaceObject = require("@toruslabs/http-helpers"); | ||
;// CONCATENATED MODULE: external "base64url" | ||
const external_base64url_namespaceObject = require("base64url"); | ||
var external_base64url_default = /*#__PURE__*/__webpack_require__.n(external_base64url_namespaceObject); | ||
;// CONCATENATED MODULE: external "bn.js" | ||
@@ -745,2 +748,3 @@ const external_bn_js_namespaceObject = require("bn.js"); | ||
function signDataWithPrivKey(data, privKey) { | ||
@@ -782,3 +786,3 @@ const sig = common_types_namespaceObject.ecCurve.sign(keccak256(Buffer.from(external_json_stable_stringify_default()(data), "utf8")), (0,common_types_namespaceObject.toPrivKeyECC)(privKey), "utf-8"); | ||
} | ||
const serializedEncryptedDetails = btoa(external_json_stable_stringify_default()(encryptedDetails)); | ||
const serializedEncryptedDetails = external_base64url_default().encode(external_json_stable_stringify_default()(encryptedDetails)); | ||
return serializedEncryptedDetails; | ||
@@ -818,3 +822,3 @@ } | ||
} | ||
const encryptedMessage = JSON.parse(atob(metadataResponse.message)); | ||
const encryptedMessage = JSON.parse(external_base64url_default().decode(metadataResponse.message)); | ||
let decrypted; | ||
@@ -821,0 +825,0 @@ if (privKey) { |
@@ -5,2 +5,3 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty'; | ||
import { post } from '@toruslabs/http-helpers'; | ||
import base64url from 'base64url'; | ||
import BN from 'bn.js'; | ||
@@ -173,3 +174,3 @@ import { keccak256 } from 'ethereum-cryptography/keccak'; | ||
} | ||
const serializedEncryptedDetails = btoa(stringify(encryptedDetails)); | ||
const serializedEncryptedDetails = base64url.encode(stringify(encryptedDetails)); | ||
return serializedEncryptedDetails; | ||
@@ -209,3 +210,3 @@ } | ||
} | ||
const encryptedMessage = JSON.parse(atob(metadataResponse.message)); | ||
const encryptedMessage = JSON.parse(base64url.decode(metadataResponse.message)); | ||
let decrypted; | ||
@@ -212,0 +213,0 @@ if (privKey) { |
{ | ||
"name": "@tkey/storage-layer-torus", | ||
"version": "11.0.2", | ||
"version": "11.0.3", | ||
"description": "TKey Torus Storage Layer Module", | ||
@@ -41,4 +41,5 @@ "author": "Torus Labs", | ||
"dependencies": { | ||
"@tkey/common-types": "^11.0.2", | ||
"@tkey/common-types": "^11.0.3", | ||
"@toruslabs/http-helpers": "^5.0.0", | ||
"base64url": "3.0.1", | ||
"bn.js": "^5.2.1", | ||
@@ -49,3 +50,3 @@ "ethereum-cryptography": "^2.1.2", | ||
"devDependencies": { | ||
"@types/bn.js": "^5.1.1", | ||
"@types/bn.js": "^5.1.2", | ||
"@types/json-stable-stringify": "^1.0.34" | ||
@@ -66,3 +67,3 @@ }, | ||
}, | ||
"gitHead": "72bbcd7e3c7bc0b75c3136a9fa98399fa3a6ee4e" | ||
"gitHead": "d9567b597de82d13c80a895a6795f63d52598de7" | ||
} |
@@ -21,2 +21,3 @@ import { | ||
import { post } from "@toruslabs/http-helpers"; | ||
import base64url from "base64url"; | ||
import BN from "bn.js"; | ||
@@ -63,3 +64,3 @@ import { keccak256 } from "ethereum-cryptography/keccak"; | ||
} | ||
const serializedEncryptedDetails = btoa(stringify(encryptedDetails)); | ||
const serializedEncryptedDetails = base64url.encode(stringify(encryptedDetails)); | ||
return serializedEncryptedDetails; | ||
@@ -86,3 +87,3 @@ } | ||
} | ||
const encryptedMessage = JSON.parse(atob(metadataResponse.message)); | ||
const encryptedMessage = JSON.parse(base64url.decode(metadataResponse.message)); | ||
@@ -89,0 +90,0 @@ let decrypted: Buffer; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
1282315
2687
7
+ Addedbase64url@3.0.1
Updated@tkey/common-types@^11.0.3