Update base64.js

This commit is contained in:
Namhyeon Go 2022-01-18 01:10:57 +09:00 committed by GitHub
parent 5ea363ee5e
commit 799fa588d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,16 +2,19 @@
// Base64 API // Base64 API
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
var XML = require("lib/xml"); //var XML = require("lib/xml");
var PS = require("lib/powershell");
exports.encode = function(sText) { exports.encode = function(sText) {
return XML.create().createElement("base64").encode(sText, "bin.base64"); return PS.execScript("app\\assets\\ps1\\base64encode", [sText]).trim();
//return XML.create().createElement("base64").encode(sText, "bin.base64");
}; };
exports.decode = function(vCode) { exports.decode = function(vCode) {
return XML.create().createElement("base64").decode(vCode, "bin.base64"); return PS.execScript("app\\assets\\ps1\\base64decode", [vCode]).trim();
//return XML.create().createElement("base64").decode(vCode, "bin.base64");
}; };
exports.VERSIONINFO = "Base64 Module (base64.js) version 0.2"; exports.VERSIONINFO = "Base64 Module (base64.js) version 0.3";
exports.global = global; exports.global = global;
exports.require = require; exports.require = require;