From 836149e61f73262d53eb62f18065d762120a0c8c Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Tue, 16 Jun 2009 15:47:38 +0000 Subject: [PATCH] we don't need base64 decode git-svn-id: http://svg-edit.googlecode.com/svn/trunk@131 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 3d95afe2..9c39bedd 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -820,38 +820,7 @@ var Utils = { this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4); } while (i < input.length); - return output; - }, - - "decode64" : function(input) { - var output = ""; - var chr1, chr2, chr3; - var enc1, enc2, enc3, enc4; - var i = 0; - - // remove all characters that are not A-Z, a-z, 0-9, +, /, or = - input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - - do { - enc1 = this._keyStr.indexOf(input.charAt(i++)); - enc2 = this._keyStr.indexOf(input.charAt(i++)); - enc3 = this._keyStr.indexOf(input.charAt(i++)); - enc4 = this._keyStr.indexOf(input.charAt(i++)); - - chr1 = (enc1 << 2) | (enc2 >> 4); - chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); - chr3 = ((enc3 & 3) << 6) | enc4; - - output = output + String.fromCharCode(chr1); - - if (enc3 != 64) { - output = output + String.fromCharCode(chr2); - } - if (enc4 != 64) { - output = output + String.fromCharCode(chr3); - } - } while (i < input.length); - return output; } + }