@magic-sdk/provider
Advanced tools
Comparing version 2.5.5 to 2.5.6
@@ -15,2 +15,6 @@ ## Upcoming Changes | ||
## `2.6.0` - 08/04/2020 | ||
Add `process` and `buffer` to the dependencies | ||
## `2.5.5` - 07/22/2020 | ||
@@ -17,0 +21,0 @@ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; | ||
/* eslint-disable */ | ||
/* istanbul ignore next */ | ||
@@ -9,3 +10,4 @@ function fromByteArray(uint8) { | ||
var output = ''; | ||
var temp, length; | ||
var temp; | ||
var length; | ||
function encode(num) { | ||
@@ -15,7 +17,7 @@ return lookup.charAt(num); | ||
function tripletToBase64(num) { | ||
return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F); | ||
return encode((num >> 18) & 0x3f) + encode((num >> 12) & 0x3f) + encode((num >> 6) & 0x3f) + encode(num & 0x3f); | ||
} | ||
// go through the array every three bytes, we'll deal with trailing stuff later | ||
for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { | ||
temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]); | ||
temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + uint8[i + 2]; | ||
output += tripletToBase64(temp); | ||
@@ -28,10 +30,10 @@ } | ||
output += encode(temp >> 2); | ||
output += encode((temp << 4) & 0x3F); | ||
output += encode((temp << 4) & 0x3f); | ||
output += '=='; | ||
break; | ||
case 2: | ||
temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]); | ||
temp = (uint8[uint8.length - 2] << 8) + uint8[uint8.length - 1]; | ||
output += encode(temp >> 10); | ||
output += encode((temp >> 4) & 0x3F); | ||
output += encode((temp << 2) & 0x3F); | ||
output += encode((temp >> 4) & 0x3f); | ||
output += encode((temp << 2) & 0x3f); | ||
output += '='; | ||
@@ -46,12 +48,7 @@ break; | ||
function b64enc(buf) { | ||
return fromByteArray(buf) | ||
.replace(/\+/g, "-") | ||
.replace(/\//g, "_") | ||
.replace(/=/g, ""); | ||
return fromByteArray(buf).replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, ''); | ||
} | ||
/* istanbul ignore next */ | ||
function b64RawEnc(buf) { | ||
return fromByteArray(buf) | ||
.replace(/\+/g, "-") | ||
.replace(/\//g, "_"); | ||
return fromByteArray(buf).replace(/\+/g, '-').replace(/\//g, '_'); | ||
} | ||
@@ -64,3 +61,3 @@ /* istanbul ignore next */ | ||
}) | ||
.join(""); | ||
.join(''); | ||
} | ||
@@ -84,3 +81,3 @@ /** | ||
clientData: b64enc(clientDataJSON), | ||
registrationClientExtensions: JSON.stringify(registrationClientExtensions) | ||
registrationClientExtensions: JSON.stringify(registrationClientExtensions), | ||
}; | ||
@@ -106,5 +103,5 @@ }; | ||
signature: hexEncode(sig), | ||
assertionClientExtensions: JSON.stringify(assertionClientExtensions) | ||
assertionClientExtensions: JSON.stringify(assertionClientExtensions), | ||
}; | ||
}; | ||
//# sourceMappingURL=webauthn.js.map |
var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; | ||
/* eslint-disable */ | ||
/* istanbul ignore next */ | ||
@@ -7,3 +8,4 @@ function fromByteArray(uint8) { | ||
var output = ''; | ||
var temp, length; | ||
var temp; | ||
var length; | ||
function encode(num) { | ||
@@ -13,7 +15,7 @@ return lookup.charAt(num); | ||
function tripletToBase64(num) { | ||
return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F); | ||
return encode((num >> 18) & 0x3f) + encode((num >> 12) & 0x3f) + encode((num >> 6) & 0x3f) + encode(num & 0x3f); | ||
} | ||
// go through the array every three bytes, we'll deal with trailing stuff later | ||
for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { | ||
temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]); | ||
temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + uint8[i + 2]; | ||
output += tripletToBase64(temp); | ||
@@ -26,10 +28,10 @@ } | ||
output += encode(temp >> 2); | ||
output += encode((temp << 4) & 0x3F); | ||
output += encode((temp << 4) & 0x3f); | ||
output += '=='; | ||
break; | ||
case 2: | ||
temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]); | ||
temp = (uint8[uint8.length - 2] << 8) + uint8[uint8.length - 1]; | ||
output += encode(temp >> 10); | ||
output += encode((temp >> 4) & 0x3F); | ||
output += encode((temp << 2) & 0x3F); | ||
output += encode((temp >> 4) & 0x3f); | ||
output += encode((temp << 2) & 0x3f); | ||
output += '='; | ||
@@ -44,12 +46,7 @@ break; | ||
function b64enc(buf) { | ||
return fromByteArray(buf) | ||
.replace(/\+/g, "-") | ||
.replace(/\//g, "_") | ||
.replace(/=/g, ""); | ||
return fromByteArray(buf).replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, ''); | ||
} | ||
/* istanbul ignore next */ | ||
function b64RawEnc(buf) { | ||
return fromByteArray(buf) | ||
.replace(/\+/g, "-") | ||
.replace(/\//g, "_"); | ||
return fromByteArray(buf).replace(/\+/g, '-').replace(/\//g, '_'); | ||
} | ||
@@ -62,3 +59,3 @@ /* istanbul ignore next */ | ||
}) | ||
.join(""); | ||
.join(''); | ||
} | ||
@@ -82,3 +79,3 @@ /** | ||
clientData: b64enc(clientDataJSON), | ||
registrationClientExtensions: JSON.stringify(registrationClientExtensions) | ||
registrationClientExtensions: JSON.stringify(registrationClientExtensions), | ||
}; | ||
@@ -104,5 +101,5 @@ }; | ||
signature: hexEncode(sig), | ||
assertionClientExtensions: JSON.stringify(assertionClientExtensions) | ||
assertionClientExtensions: JSON.stringify(assertionClientExtensions), | ||
}; | ||
}; | ||
//# sourceMappingURL=webauthn.js.map |
{ | ||
"name": "@magic-sdk/provider", | ||
"version": "2.5.5", | ||
"version": "2.5.6", | ||
"description": "Core business logic for Magic SDK packages.", | ||
@@ -23,3 +23,3 @@ "author": "Fortmatic <team@fortmatic.com> (https://fortmatic.com/)", | ||
"dependencies": { | ||
"@magic-sdk/types": "^1.4.5", | ||
"@magic-sdk/types": "^1.4.6", | ||
"eventemitter3": "^4.0.4" | ||
@@ -62,3 +62,3 @@ }, | ||
}, | ||
"gitHead": "bee31bead5a41b53a73c0d7a7b6cb82ab0312245" | ||
"gitHead": "2290b381edc7224bb7d0d30c94d596514919a104" | ||
} |
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 not supported yet
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
842840
4941
Updated@magic-sdk/types@^1.4.6