diff --git a/dist/OpenCrypto.min.js b/dist/OpenCrypto.min.js index f2f9fe0..0bac8b0 100644 --- a/dist/OpenCrypto.min.js +++ b/dist/OpenCrypto.min.js @@ -1 +1 @@ -'use strict';var _typeof='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&'function'==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?'symbol':typeof a};function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}var cryptoLib=window.crypto||window.msCrypto,cryptoApi=cryptoLib.subtle||cryptoLib.webkitSubtle,chars='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',lookup=new Uint8Array(256),PBES2_OID='06092a864886f70d01050d',PBKDF2_OID='06092a864886f70d01050c',AES256GCM_OID='060960864801650304012e',AES192GCM_OID='060960864801650304011a',AES128GCM_OID='0609608648016503040106',AES256CBC_OID='060960864801650304012a',AES192CBC_OID='0609608648016503040116',AES128CBC_OID='0609608648016503040102',AES256CFB_OID='060960864801650304012c',AES192CFB_OID='0609608648016503040118',AES128CFB_OID='06086086480165030404',SHA512_OID='06082a864886f70d020b0500',SHA384_OID='06082a864886f70d020a0500',SHA256_OID='06082a864886f70d02090500',SHA1_OID='06082a864886f70d02070500',RSA_OID='06092a864886f70d010101',EC_OID='06072a8648ce3d0201',P256_OID='06082a8648ce3d030107',P384_OID='06052b81040022',P521_OID='06052b81040023',OpenCrypto=function(){function a(){_classCallCheck(this,a);for(var b=0;b>2],f+=chars[(3&c[g])<<4|c[g+1]>>4],f+=chars[(15&c[g+1])<<2|c[g+2]>>6],f+=chars[63&c[g+2]];return 2==e%3?f=f.substring(0,f.length-1)+'=':1==e%3&&(f=f.substring(0,f.length-2)+'=='),f},a.prototype.decodeAb=function decodeAb(b){var g,j,k,l,c=0.75*b.length,e=b.length,f=0;'='===b[b.length-1]&&(c--,'='===b[b.length-2]&&c--);for(var m=new ArrayBuffer(c),n=new Uint8Array(m),o=0;o>4,n[f++]=(15&j)<<4|k>>2,n[f++]=(3&k)<<6|63&l;return m},a.prototype.arrayBufferToString=function arrayBufferToString(b){if('object'!==('undefined'==typeof b?'undefined':_typeof(b)))throw new TypeError('Expected input to be an ArrayBuffer Object');var c=new TextDecoder('utf-8');return c.decode(b)},a.prototype.stringToArrayBuffer=function stringToArrayBuffer(b){if('string'!=typeof b)throw new TypeError('Expected input to be a String');var c=new TextEncoder('utf-8'),e=c.encode(b);return e.buffer},a.prototype.arrayBufferToHexString=function arrayBufferToHexString(b){if('object'!==('undefined'==typeof b?'undefined':_typeof(b)))throw new TypeError('Expected input to be an ArrayBuffer Object');for(var c=new Uint8Array(b),e='',f=void 0,g=0;gf.length&&(f='0'+f),e+=f;return e},a.prototype.hexStringToArrayBuffer=function hexStringToArrayBuffer(b){if('string'!=typeof b)throw new TypeError('Expected input of hexString to be a String');if(0!=b.length%2)throw new RangeError('Expected string to be an even number of characters');for(var c=new Uint8Array(b.length/2),e=0;e>2],f+=chars[(3&c[g])<<4|c[g+1]>>4],f+=chars[(15&c[g+1])<<2|c[g+2]>>6],f+=chars[63&c[g+2]];return 2==e%3?f=f.substring(0,f.length-1)+'=':1==e%3&&(f=f.substring(0,f.length-2)+'=='),f},a.prototype.decodeAb=function decodeAb(b){var g,j,k,l,c=0.75*b.length,e=b.length,f=0;'='===b[b.length-1]&&(c--,'='===b[b.length-2]&&c--);for(var m=new ArrayBuffer(c),n=new Uint8Array(m),o=0;o>4,n[f++]=(15&j)<<4|k>>2,n[f++]=(3&k)<<6|63&l;return m},a.prototype.arrayBufferToString=function arrayBufferToString(b){if('object'!==('undefined'==typeof b?'undefined':_typeof(b)))throw new TypeError('Expected input to be an ArrayBuffer Object');var c=new TextDecoder('utf-8');return c.decode(b)},a.prototype.stringToArrayBuffer=function stringToArrayBuffer(b){if('string'!=typeof b)throw new TypeError('Expected input to be a String');var c=new TextEncoder('utf-8'),e=c.encode(b);return e.buffer},a.prototype.arrayBufferToHexString=function arrayBufferToHexString(b){if('object'!==('undefined'==typeof b?'undefined':_typeof(b)))throw new TypeError('Expected input to be an ArrayBuffer Object');for(var c=new Uint8Array(b),e='',f=void 0,g=0;gf.length&&(f='0'+f),e+=f;return e},a.prototype.hexStringToArrayBuffer=function hexStringToArrayBuffer(b){if('string'!=typeof b)throw new TypeError('Expected input of hexString to be a String');if(0!=b.length%2)throw new RangeError('Expected string to be an even number of characters');for(var c=new Uint8Array(b.length/2),e=0;e