This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2023-05-03 02:43:29 -07:00
|
|
|
export const decode = (base64: string): Uint8Array => {
|
2018-08-23 13:02:42 -07:00
|
|
|
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;
|
|
|
|
};
|