Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@evervault/sdk

Package Overview
Dependencies
Maintainers
5
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evervault/sdk - npm Package Compare versions

Comparing version 0.3.6 to 0.3.7

2

package.json
{
"name": "@evervault/sdk",
"version": "0.3.6",
"version": "0.3.7",
"description": "evervault Browser SDK",

@@ -5,0 +5,0 @@ "repository": {

@@ -15,4 +15,29 @@ /** @format */

static padString(input) {
let segmentLength = 4;
let stringLength = input.length;
let diff = stringLength % segmentLength;
if (!diff) {
return input;
}
let position = stringLength;
let padLength = segmentLength - diff;
let paddedStringLength = stringLength + padLength;
let buffer = Buffer.alloc(paddedStringLength);
buffer.write(input);
while (padLength--) {
buffer.write("=", position++);
}
return buffer.toString();
}
static b64ToBuffer(b64String) {
const decodedStr = window.atob(b64String);
const reEncodedString = this.padString(b64String)
.replace(/\-/g, "+")
.replace(/_/g, "/");
const decodedStr = window.atob(reEncodedString);
var buf = new ArrayBuffer(decodedStr.length);

@@ -156,3 +181,3 @@ var bufView = new Uint8Array(buf);

static areHashValuesFromAuth(urlValues) {
const authRegex = /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=?){1}:((eyJ){1}[A-Za-z0-9-_]+\.(eyJ){1}[A-Za-z0-9-_]+\.[A-Za-z0-9-_.+\/=]*){1}:([a-z]+-[a-z]+-[0-9]{6,8}.[a-f0-9]{8}-[a-f0-9]{3,4}-[a-f0-9]{3,4}-[a-f0-9]{3,4}-[a-f0-9]{12}){1}$/;
const authRegex = /^([A-Za-z0-9-_])+:((eyJ){1}[A-Za-z0-9-_]+\.(eyJ){1}[A-Za-z0-9-_]+\.[A-Za-z0-9-_.+\/=]*){1}:([a-z]+-[a-z]+-[0-9]{6,8}.[a-f0-9]{8}-[a-f0-9]{3,4}-[a-f0-9]{3,4}-[a-f0-9]{3,4}-[a-f0-9]{12}){1}$/;
return authRegex.test(urlValues);

@@ -159,0 +184,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc