You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
269 B
11 lines
269 B
2 years ago
|
export const decode = (base64: string): Uint8Array => {
|
||
6 years ago
|
const rawData = window.atob(base64);
|
||
|
const outputArray = new Uint8Array(rawData.length);
|
||
|
|
||
|
for (let i = 0; i < rawData.length; ++i) {
|
||
|
outputArray[i] = rawData.charCodeAt(i);
|
||
|
}
|
||
|
|
||
|
return outputArray;
|
||
|
};
|