Change base64 slash to minus.
This commit is contained in:
parent
1349268a80
commit
a817ccdcb9
@ -31,7 +31,9 @@ const PACK = {
|
|||||||
for(let i = 0; i < bytes.length; ++i) {
|
for(let i = 0; i < bytes.length; ++i) {
|
||||||
str += String.fromCharCode(bytes[i]);
|
str += String.fromCharCode(bytes[i]);
|
||||||
}
|
}
|
||||||
return window.btoa(str);
|
let enc = window.btoa(str);
|
||||||
|
enc.replace("/", "-");
|
||||||
|
return enc;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -129,6 +131,7 @@ const UNPACK = {
|
|||||||
return str;
|
return str;
|
||||||
},
|
},
|
||||||
base64(data) {
|
base64(data) {
|
||||||
|
data.replace("-", "/");
|
||||||
let str = window.atob(data);
|
let str = window.atob(data);
|
||||||
let bytes = new Uint8Array(str.length);
|
let bytes = new Uint8Array(str.length);
|
||||||
for(let i = 0; i < bytes.length; ++i) {
|
for(let i = 0; i < bytes.length; ++i) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user