ToolFk is a free test kit that programmers use online. ToolFk focuses on the tools that programmers use every day. You don’t need to install any software, just paste the content and press the execute button to get the results you want. ToolFk also supports BarCode BarCode generation online, QueryList collector, PHP code running online, PHP obfuscation, encryption, decryption, Python code online running, JavaScript online running, YAML Formatting Tool, HTTP simulation query tool, HTML online toolbox, JavaScript online toolbox, CSS online toolbox, JSON online toolbox, Unixtime timestamp conversion, Base64/URL/N Ative2Ascii conversion, CSV conversion toolbox, XML online toolbox, WebSocket online tool, Markdown online toolbox, Htaccess2nginx Conversion, base online conversion, online encryption toolbox, online pseudo-original tool, online APK decompile, online webpage screenshot tool, online random password generation, online Qrcode Qrcode generation, online Crontab expression generation, online short url generation, online calculator tool. Such as more than 20 daily programmer development tools, is a very comprehensive programmer toolbox site.
Site name: ToolFk Site Link: www.toolfk.com/ Tool link: www.toolfk.com/tool-encdec…
The code of teaching
This tool [online BASE64 encryption and decryption, UrlEncode encoding/decoding, native/ ASCII online conversion tool] depends on the code base
Github.com/zenorocha/c…
Github.com/codemirror/…
Github.com/beatgammit/…
STEP 1
STEP 2
The core code is as follows
function base64_encode(message){
var base = new Base64();
var value = base.encode(message);
return value;
}
function base64_decode(message){
var base = new Base64();
var value = base.decode(message);
return value;
}
function url_encode(message){
var value= encodeURIComponent(message);
return value;
}
function url_decode(message){
var value= decodeURIComponent(message);
return value;
}
function ascii_unicode(message){
var len = message.length;
var result = ' ';
for (var i = 0; i < len; i++)
result+= '& #' + message.charCodeAt(i) + '; ';
return result;
}
function unicode_ascii(message){
var code = message.match(/&#(\d+); /g);
if (code == null) {
var msg = "@lang('toolfk.lang_text_valid_txt')";
layer.msg(msg);
return msg;
}
var result = ' ';
for (var i = 0; i < code.length; i++)
result += String.fromCharCode(code[i].replace(/[&#; ] /g, ''));
return result;
}
function ascii_native(message){
var nativecode = message.split("");
var ascii = "";
for (var i = 0; i < nativecode.length; i++) {
var code = Number(nativecode[i].charCodeAt(0));
if (code > 127) {
var charAscii = code.toString(16);
charAscii = new String("0000").substring(charAscii.length, 4) + charAscii;
ascii += "\\u" + charAscii;
} else{ ascii += nativecode[i]; }}return ascii;
}
function native_ascii(message){
var asciicode = message.split("\\u");
var nativeValue = asciicode[0];
for (var i = 1; i < asciicode.length; i++) {
var code = asciicode[i];
nativeValue += String.fromCharCode(parseInt("0x" + code.substring(0, 4)));
if(code.length > 4) { nativeValue += code.substring(4, code.length); }}return nativeValue;
}Copy the code
Three reasons it’s worth a try:
-
Integrate a variety of development test tools commonly used in programmer development.
-
Simple and beautiful atmosphere of the website page
-
Support online formatting execution code, APK online decompilation, online high-strength password generation, online web page screenshots and more than 20 tool services
-
Also recommend its sister network www.videofk.com video download toolbox
This paper links: www.hihubs.com/article/370