mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-09-18 16:00:44 +00:00
build
config
core
crypto
api
bitcoin
deps
Base58.js
Base64.js
bcrypt.js
broken-ripemd160.js
deps.js
ed2curve.js
nacl-fast.js
qora.js
ripemd160.js
sha256.js
utils.js
transactions
utils
wallet
PhraseWallet.js
api.js
constants.js
createTransaction.js
createWallet.js
decryptStoredWallet.js
fetch-request.js
kdf.js
registerUsername.js
storeWallet.js
tradeRequest.js
api.js
api_deps.js
config.js
img
lib
locales
plugins
scripts
snap
splash
.editorconfig
.eslintrc.json
.gitattributes
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE
README.md
build-setup.js
build.bat
build.js
build.sh
electron-builder.yml
electron.js
install-dependencies.sh
package-lock.json
package.json
push-updates-with-travis-build.sh
run_server.bat
server.js
set-up-snap.sh
watch-inline.js
watch.js
24 lines
436 B
JavaScript
24 lines
436 B
JavaScript
|
|
const Base64 = {};
|
|
|
|
|
|
|
|
Base64.decode = function (string) {
|
|
|
|
const binaryString = atob(string);
|
|
const binaryLength = binaryString.length;
|
|
const bytes = new Uint8Array(binaryLength);
|
|
|
|
for (let i = 0; i < binaryLength; i++) {
|
|
bytes[i] = binaryString.charCodeAt(i);
|
|
}
|
|
|
|
const decoder = new TextDecoder();
|
|
const decodedString = decoder.decode(bytes);
|
|
return decodedString;
|
|
};
|
|
|
|
|
|
|
|
|
|
export default Base64; |