reverse atob and btoa to proper standard (damn dyslexia)

This commit is contained in:
zefie
2023-11-10 15:04:48 -05:00
parent bd26ba8923
commit 87f09ffec1
3 changed files with 19 additions and 19 deletions

View File

@@ -79,26 +79,26 @@ class WTVShared {
}
}
/**
* CryptoJS implmentation of Base64 Decoder
* @param {string} a Base64 String
* @return {string} Decoded string
*/
atob(a) {
const CryptoJS = require('crypto-js');
const enc = CryptoJS.enc.Base64.parse(a);
return CryptoJS.enc.Utf8.stringify(enc)
}
/**
* CryptoJS implmentation of Base64 Encoder
* @param {string} b String to encode
* @returns {string} Base64 encoded string
*/
atob(a) {
const CryptoJS = require('crypto-js');
const enc = CryptoJS.enc.Utf8.parse(a); // encodedWord Array object
return CryptoJS.enc.Base64.stringify(enc);
}
/**
* CryptoJS implmentation of Base64 Decoder
* @param {string} a Base64 String
* @return {string} Decoded string
*/
btoa(b) {
const CryptoJS = require('crypto-js');
const enc = CryptoJS.enc.Utf8.parse(b); // encodedWord Array object
return CryptoJS.enc.Base64.stringify(enc);
const enc = CryptoJS.enc.Base64.parse(b);
return CryptoJS.enc.Utf8.stringify(enc)
}
/**