Base64 To Binary Javascript

Now we take a look at the HTML file:. Base64 (MIME) Encode and Decode Tool. This operation could be applied for any binary files. For example, the eight-byte binary data in hex "35 71 4d 8e 4c 5f db 42" converts to Base64 text as "NXFNjkxf20I=". The input can be a String, Blob, or Typed Array of data, or via a dataURL representing the file's data as. Base Converter. This sample demonstrates how to convert image to base64 string How to get the base64 data of an image file using JavaScript in Windows store ap sample in JavaScript for Visual Studio 2012 Breaking news from around the world Get the Bing + MSN extension. setup = function {var textEncoder1 = new TextEncoder('utf-16'); var input = ; // Allow each method to define constants here var keyStr =. Load an image – get base64. This guarantees that the data stays unchanged without modification during transfer. The entire email is backed up into a text file, and very occasionally I need to check what was in an attachment. How can I source a base 64 encoded file in bash? 0. So, in this article we have discussed the easiest approach of how to convert binary to decimal and also how to convert binary fraction to decimal. Lets first talk about encoding and decoding javascript, In javascript to encode a string we use btoa function. Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does. Base64 encoding is generally achieved by splitting a stream or block of data into 6-bit fragments and interpreting each fragment as the position in the. Online tool to translate ASCII/ANSI, HEX, Binary, Base64, etc Encoder/Decoder with MD2, MD4, MD5, SHA1+2, RIPEMD, CRC, etc. This, of course, is a Byte Array. Fast, free, and without ads. But if you really want the binary data itself like you initially mentioned, in binary format, you will need to decode the base64 representation (you can find several posts discussing this topic here, here and here) along with the description of base64 with some example data and how it is encoded/decoded. since that was not working, i just put the datatype value as "bin. Just paste raw data and press "encode to base64" button. This perked my curiosity. World's simplest base64 file encoder. The binary bits represented by the 1's and 0's in the second line correspond to the binary bits in each of the bytes in the incoming array after the bytes have been concatenated. Browsers get ugly when raw binary data appears in the HTML. Just import your UTF8 text in the editor on the left and you will instantly get its base64 encoding on the right. Click on the filename link to download the file. btoa()及びwindow. Base64 is a coding system using 64 characters, selected to be compatible with a majority of coding tables. Online tool for base64 encoding a string. This guarantees that the data stays unchanged without modification during transfer. Base64 encoding is useful in the context of lengthy binary data and HTTP GET requests. It is possible to convert directly from one format to another. A test-string is attached. If the Basic or MIME variant was used, any + or / characters in the encoded data would have to be URL-encoded into hexadecimal sequences ( + becomes %2B and / becomes %2F ). *IF* this can be done, embedding the. Base64 encoding uses only letters a-z, A-Z, 0-9 and plus, slash and equals sign characters. Base64 to text. For instance, FTP translates line endings. To convert text to binary, you can use [code]"A". These encode data is unreadable by a human. This is why, for instance, e-mail attachments were usually encoded in base64. Base64 encoding schemes are commonly used when there is a need to encode binary data that needs be stored and transferred over media that are designed to deal with textual data. This encoding may be referred to as "base64". By passing the second parameter, we tell JavaScript that "the string you see is encoded in this particular format". Base64 (MIME) Encode Tool. Convert base64 string to file. ASCII Converter enables you to easily convert ASCII characters to their hex, decimal, and binary representations. 0_01/jre\ gtint :tL;tH=f %Jn! [email protected]@ Wrote%dof%d if($compAFM){ -ktkeyboardtype =zL" filesystem-list \renewcommand{\theequation}{\#} L;==_1 =JU* L9cHf lp. js If you have binary data that you need to encode to pass to the client as JSON, you can convert it to base64, a common means on the Internet to represent eight-bit values in solely printable characters. Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does. Created by developers for developers. Created by computer nerds from team Browserling. World's simplest browser-based base64 to UTF8 converter. append("file", arraybuffer, "test. But if you really want the binary data itself like you initially mentioned, in binary format, you will need to decode the base64 representation (you can find several posts discussing this topic here, here and here) along with the description of base64 with some example data and how it is encoded/decoded. This converter supports accents and special characters. decode(pngBase64). Common to all binary-to-text encoding schemes, Base64 is designed to carry data stored in binary formats across channels that only reliably support text content. This is needed in order to support platforms like Android which already include an older version of the Apache Commons Codec (Android includes version 1. There are some good links in references section so you can dive deeply if you want. A string in base64 format is composed of the characters as follows: a-z, A-Z, 0-9, + and /. Binary is also easily converted to the octal numeral system, since octal uses a radix of 8, which is a power of two (namely, 2 3, so it takes exactly three binary digits to represent an octal digit). VBScript – Convert Image To Base 64 Published by Chris West on September 23, 2013 Last week I wrote a function which takes a file path and returns the base64 PNG code for that image. Code Snippet Default. The term Base64 originates from a specific MIME content transfer encoding. The method of Base64 encoding is encoded to replacing the data with 64 ASCII characters (Text characters). The binary numeral system, or base-2 number system, represents numeric values using two symbols, 0 and 1. WHY do you wish to convert it to base64? With nodejs it is pretty straightforward, but if you are converting it to ASCII, can we make sure you doing so for a good reason. Convert image base64 using this tool to base64 encode images for use in html, css, javascript, etc. jbiard$ node base64toSVG. Nowadays, most browsers (even IE10), support transfer of binary data over WebSockets. To encode binary files you'll need to use the TBase64EncodingStream object. DDecode - PHP Decoder - Decoding Hidden Evals, base64 decode, gzinflates from PHP files. A Binary To Image File Transcoder In JavaScript Posted on 2017/08/14 by thiscouldbebetter The JavaScript program below, when run, allows the user to load an arbitrary file as bytes, convert it to a PNG image, save the image as a file, reload that image file, convert it back to bytes, and re-save the bytes. If you don't know they're there, you can spend a while implementing your own algorithm, and that's just Not Fun. Learn how to decode a Base64 encoded data back to normal text in Javascript. 1 blob to base64 asynchronously using FileReader's readAsDataURL 2 blob to base64 asynchronously using FileReader's readAsArrayBuffer, String's fromCharCode and btoa 3 base64 to blob synchronously using atob, ArrayBuffer, String's charCodeAt and Blob's constructor. They are all available here for free for the developers and users out there who might find them useful. I have some automated processes that receive updates via email attachments which are base64 encoded. Base64 is an encoding schema that represents binary data in an ASCII string. Copy the codes in the tab below and replace "YOUR BASE64 STRING HERE" with your own Base64 string. function dataURItoBlob(dataURI, callback) {// convert base64 to raw binary data held in a string // doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this. This page provides a Javascript online web-based Base64 Encoder/Decoder that can be used to convert text and binary data. The base64_encode() function is an inbuilt function in PHP which is used to Encodes data with MIME base64. This, of course, is a Byte Array. Encode Image to Base64 String. It is typically used in URLs and file names. ENC_BASE64( value ) Note : Output data is 33% longer than original data. It is important to mention here that Base64 is not an encryption or compression technique, although it can sometimes be confused as encryption due to the way it seems to obscure data. Is it possible to use java-side base64 decoder from javascript webscipt? Somebody could post an example?. Valerio picked up the idea and made some enhancements. Encode Image to Base64 String. ToBase64String and Convert. The encoder does not add any line feed (line separator) character. And what's more important - we can use this encoding in "data-urls". DDecode - PHP Decoder - Decoding Hidden Evals, base64 decode, gzinflates from PHP files. Your files are not transferred to the server. Enter your email address to follow this blog and receive notifications of new posts by email. Base64 is a binary-to-text encoding scheme that represents binary data in a printable ASCII string format. Content includes tutorials and references relating to HTML, CSS, JavaScript, React, Angular, Vue, SASS, jQuery, AJAX, XML, SQL. This is similar to how you embed an image in a HTML email message. Encode the bytes as an array of numbers or a hex string. Let see how to convert an Image to Base64 string and Base64 String to Image. streamEncode() method:. Created by geeks from team Browserling. since that was not working, i just put the datatype value as "bin. Server takes the binary stream and decodes the Base64 data to an original binary stream; 4. Learning jQuery Fourth Edition Karl Swedberg and Jonathan Chaffer jQuery in Action Bear Bibeault, Yehuda Katz, and Aurelio De Rosa jQuery Succinctly Cody Lindley. Please do not post more. This guarantees that the data stays unchanged without modification during transfer. Online tool to translate ASCII/ANSI, Hexadecimal, Binary, Base64, Decimal. The application sends a base64 string to the server; I needed to transform it to binary, do some manipulation in memory, and then re-encode the string. The encoder does not add any line feed (line separator) character. Save palletes to see what works together. Load base64 - get an image. Decoding Base64 encoded data to binary data in Node. The benefit of base64 comes in situations where you need to transfer binary data through a channel which doesn't support binary well or at all. Just paste your base64-encoded JPG photo in the input area and you will instantly get a viewable and downloadable JPG in the output area. Why? While traveling to the Firefox 4 launch parties in Seoul and Taipei all the way from California, we killed a lot of time by brainstorming cool things to do with the web platform. In practice, an 8th bit is added and used as a parity bit to detect transmission errors. This was horribly ineffecient given that each byte of number type probably occupied 4 or 8 bytes, so you would be using 4 or 8 times the space. In base64 encoding, every 4 symbols get converted to 3 human-readable characters. Here is the final result and our canvas data to binary image function:. Base64 is an encoding scheme that converts binary data into text characters. Choose Passthrough if you do not want to convert the body when the client and backend accepts the same binary format. A test-string is attached. NodeValue = SomeFunction(&img); If you have some information in this regard, please let me know. That why we call its Base64 encode. Convert a base64 encoded text into an decoded string or download as a binary file using this free online base64 decoder utility. Converting Between Text and UTF-8 Bytes¶. The key changes are shown below:. Import ASCII – get base64. Generate CSS and HTML codes. If you click login you can save urls in a shorter format. The following article mentions pros and cons of using base64 in Storing and displaying images with base64. a modem), or interpret certain patterns as a special character combination. streamEncode() method:. This article demonstrates several options to convert VARBINARY data into Base64 string, and vice versa convert Base64 string into VARBINARY. Base64 encoding schemes are commonly used when there is a need to encode binary data that needs be stored and transferred over media that are designed to deal with textual data. Parting tips. Estoy tratando de leer una imagen del lado del cliente codificado en base64. I also need to convert it back from Base64 to Image format so that it can displayed in a webpage/winform. I'll start by highlighting some of the pillars of binary data, hopefully in a breeze. There are many ways to encode and decode PHP code. Do realize you put the browser / client to work, it needs to decode the string back to binary data. If you know of others or any novel uses of Base64 encoding, please mention them in the comments below. I'm having a problem reading an image from a base64 string into a pictureBox. Base64-encoded data takes about 33% more space than the original data. Base 64 conversion : Base64, as says its name, is a base 64 way of seeing the data. Each 6 bits of the bit stream are encoded to base64 digit. Base64 encoding schemes are generally used when there is a need to encode binary information that needs to be stored and transferred over media that are developed to deal with textual information. Base64: Encode and Decode Base64 Files This page describes, in Unix manual page style, a program available for downloading from this site which encodes binary files in the "Base64" format used by MIME-encoded documents such as electronic mail messages with embedded images and audio files. Converting Column values from VARBINARY to Base64. js) MIME -- Convert Base64 to Binary. If base64 encoding becomes infeasible for your use-case, my recommendation would be to do this out-of-band as you suggested (i. There are no ads, popups or nonsense, just an awesome base64 image decoder. Xml to base64 encoder tool What is a xml to base64 encoder? This tool converts an XML (Extensible Markup Language) data structure to base64 encoding. JavaScript String, Binary Data と Base64. Copy the codes in the tab below and replace "YOUR BASE64 STRING HERE" with your own Base64 string. Thank you for using my tool. World's simplest browser-based utility for decoding base64 to text. 1 blob to base64 asynchronously using FileReader's readAsDataURL 2 blob to base64 asynchronously using FileReader's readAsArrayBuffer, String's fromCharCode and btoa 3 base64 to blob synchronously using atob, ArrayBuffer, String's charCodeAt and Blob's constructor. Binary File To Base64 Javascript Encoder Using Url. To convert text to binary, you can use [code]"A". In ColdFusion, the ToBinary() function takes a Base64 encoded value and converts it to its binary representation. I get the data from a WebService via SOAP as a Base64 encoded string. ToBinary("Password"), BinaryEncoding. Ben Nadel On User Experience (UX) Design, JavaScript, ColdFusion, Node. javascriptでBase64 Data URI Schemeなどで任意のデータのBase64文字列が必要な場合がある。 大体のブラウザでwindow. 1 day ago · 〔url to base64〕相關標籤文章 第1頁:Base64 URL,Convert between plaintext and base64 and base64url encoding. Proxy for version 1. Base64是网络上最常见的用于传输8Bit字节码的编码方式之一,Base64就是一种基于64个可打印字符来表示二进制数据的方法。可查看RFC2045~RFC2049,上面有MIME的详细规范。. Estoy tratando de leer una imagen del lado del cliente codificado en base64. Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data. This is needed in order to support platforms like Android which already include an older version of the Apache Commons Codec (Android includes version 1. This tool converts JPG photos to base64 encoding. If you don't know they're there, you can spend a while implementing your own algorithm, and that's just Not Fun. Import base64 – get ASCII. That said, generally, binary and text-formats don’t play nicely together if you’re not encoding the binary data. More than 1 year has passed since last update. FromBase64String(String) Method (System) | Microsoft Docs Skip to main content. Encoder that encodes using the URL and Filename safe type base64 encoding scheme. NOTE: The pad character (=) does not have a binary representation in BASE64; it is inserted into the BASE64 text as a placeholder to maintain 24-bit alignment. decode64 (enc) # -> "Send reinforcements" The purpose of using base64 to encode data is that it translates any binary data into purely printable characters. Using Base64. That why we call its Base64 encode. Import ASCII – get base64. What is Base 64 Encoded Data? Put simply, base64 encoded data is a string of character that contains only a-z, A-Z, 0-9, + and / characters and is often used in situations when sending non-text information via a text only transmission protocol. The url-safe variation emits - and _ instead of + and / characters. Load Base64, get XML. Wikipedia has a good expalanation of what base64 encoding and decoding involves. How to Encode and Decode Strings with Base64 in JavaScript. Works only in modern browsers. The result will be a String consisting of random characters, representing the image. NET methods Convert. Base64 decode from the command line Posted in Linux/Unix/BSD - Last updated Feb. Use this free tool to turn binary data into text (encode) or text into binary (decode). For like a year I was using this method: const BASE_64_RE…. Base64 encoding schemes are generally used when there is a need to encode binary information that needs to be stored and transferred over media that are developed to deal with textual information. For small size files (<20K) the performance is okay. Click the tab link below for more information on how to implement different file types in your HTML and CSS documents:. Base 64 conversion : Base64, as says its name, is a base 64 way of seeing the data. A little over a year ago I started the noVNC project, an HTML5 VNC client. The form calculates the bitwise exclusive or using the function gmp_xor. Or follow us to learn about our latest tools:. To address this binary dilemma in the JSON and XML realm, today's applications utilize the Base64 binary-to-text encoding mechanism to convert binary data into ASCII text sequences of the data. That encoding represents binary data as a string of ultra-safe “readable” characters with ASCII-codes from 0 to 64. 2) We call the convertToImg method which convert the base64 string to byte[] 3) We pass the above retrieved byte[] as argument to writeByteToImageFile method. As mentioned in the introduction of this article, without Base64 sometimes data will not be readable at all. createObjectURL is to convert a Blob into a base64-encoded string. Fast, free, and without ads. And Base64 encodes 6 Bits to a character, means 3 Bytes are encoded into. The following example shows how to decode a Base64 encoded data back to binary data. GitHub Gist: instantly share code, notes, and snippets. Import base64 – get ASCII. In other words, the raw binary data is converted to an encoded String which is value of an XML element in the SOAP message. I have some automated processes that receive updates via email attachments which are base64 encoded. An example of this is an attachment in an email. We mostly use Base64 encoding to encode binary data. Note: The File object is supported in Firefox from version 3. I get the data from a WebService via SOAP as a Base64 encoded string. Created by engineers from team Browserling. Write - base64 decoded - binary content without encoding. These encode data is unreadable by a human. Ben Nadel On User Experience (UX) Design, JavaScript, ColdFusion, Node. Term Base64 initiated from a precise MIME(Multipurpose Internet Mail Extension) content Transfer encoding. BASE64 characters are 6 bits in length. Base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. We can create an array of byte values by applying this using the. Converting Octet-Stream to Base64 Hi Everyone, Anyone know how to convert an octet-stream (pdf) to base Base64? Trying to upload a file through an api that only supports base64 and all the examples I have been trying do not seem to work or result in a corrupted pdf file. Free, quick, and very powerful. The term Base64 originates from a specific MIME content transfer encoding. The issue is that i get a base 64 binary data encription for a zip file. For binary file reading to be compatible with Chrome and MSIE, you will need to have a base64 server-side piece that will convert the binary data to BASE64 format. I get the data from a WebService via SOAP as a Base64 encoded string. swf file stream , encoded in base64 3. Base64 Encode. WHY do you wish to convert it to base64? With nodejs it is pretty straightforward, but if you are converting it to ASCII, can we make sure you doing so for a good reason. C++ wrappers are included, as well as the source code for standalone encoding and decoding executables. Lighten and darken to find the perfect color. The following example shows how to decode a Base64 encoded data back to binary data. Estoy tratando de leer una imagen del lado del cliente codificado en base64. Is it possible to have the string in Powerapps before we sent it to the database? I don't understand what you mean by TextForm = Binary. If you know of others or any novel uses of Base64 encoding, please mention them in the comments below. There are also corresponding VBScript programs to decode Base64 strings or files into hexadecimal strings or text strings. Just paste your ASCII in the input area and you will instantly get base64-encoded ASCII in the output area. Base64 encoding and decoding is very slow in JavaScript. Contains information about a file and provides access to its contents. Please do not base64 decode binary data, you are in XSLT/XML land and that does not know binary data. There are many ways to encode and decode PHP code. encode (input, output) ¶ Encode the contents of the input file and write the resulting base64 encoded data to the output file. Created by computer nerds from team Browserling. Image to base64 converter using javascript? But i have to achive this by using only. Base 64 conversion : Base64, as says its name, is a base 64 way of seeing the data. In PHP, the base64_encode() method converts the original image to a binary image. charCodeAt(0) [/code]You can test it in this tool, String to ASCII To encode using base64, you can use: [code]var encodedString = Base64. The method of Base64 encoding is encoded to replacing the data with 64 ASCII characters (Text characters). A simple browser-based utility that converts base64 encoding to JPEGs. Consequently, I would not suggest trying to dump raw binary data into your json payload. Loads MIME containing a base64 body and converts it to binary. RawURLEncoding is the unpadded alternate base64 encoding defined in RFC 4648. I'm using ASP, Vbscript. Base64 Image Converter BETA. js has moved to a new location on github. Javascript has a built-in function named btoa() (binary-to-ascii) that you can use to perform Base64 encoding. 6 (or newer) of the Apache Commons Codec org. Base Converter. It helps while doing DOM manipulation and makes Ajax requests painless across different browsers and platforms. More specifically, the usual base-2 system is a positional notation with a radix of 2. Below is a collection of various tools that I have found helpful for many years. The benefit of base64 comes in situations where you need to transfer binary data through a channel which doesn't support binary well or at all. When present, this indicates that the data content of the URI is binary data , encoded in ASCII format using the Base64 scheme for binary-to-text encoding. This was horribly ineffecient given that each byte of number type probably occupied 4 or 8 bytes, so you would be using 4 or 8 times the space. This tool converts a base64-encoded string back to a human-readable string. Base64 is a method of encoding binary data sent as an attachment through email. What is Base64 Encoding? How does Base64 encoding and decoding work? Rajeev Singh 3 mins. could you pls give me some hints on that? br. World's simplest base64 file encoder. HTML To Javascript Converter Convert html to. Hex string: Note: all characters outside hex set will be ignored, thus "12AB34" = "12 AB 34" = "12, AB, 34", etc. I have some automated processes that receive updates via email attachments which are base64 encoded. VB6/VBA functions to convert binary string to Base64 string Posted by thydzik August 16, 2011 July 27, 2013 8 Comments on VB6/VBA functions to convert binary string to Base64 string Here are some functions to convert a binary string, to a byte array, to a Base64 string and then back to a byte array and binary string. Base Converter. When the image is loaded, we then use the drawImage() method to import the image into the canvas element. 3 Answers 3. Common to all binary-to-text encoding schemes, Base64 is designed to carry data stored in binary formats across channels that only reliably support text content. In ColdFusion, the ToBinary() function takes a Base64 encoded value and converts it to its binary representation. Powerful, free, and fast. FileReader API will call the onload method once the file is completely read and the binary string will be set as the reader object's result key. 6 (or newer) of the Apache Commons Codec org. Test your Javascript and PCRE regular expressions online. Base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. And Base64 encodes 6 Bits to a character, means 3 Bytes are encoded into. The keys and values can be scalars, objects or functions. Convert a base64 string into a binary Uint8 Array. Both HTML and CSS files support the use of Base64 data strings. Convert image base64 encoder. Strings in Snowflake are composed of Unicode characters, while binary values are composed of bytes. A Binary To Image File Transcoder In JavaScript Posted on 2017/08/14 by thiscouldbebetter The JavaScript program below, when run, allows the user to load an arbitrary file as bytes, convert it to a PNG image, save the image as a file, reload that image file, convert it back to bytes, and re-save the bytes. Base64online. World's simplest browser-based base64 to UTF8 converter. Base64 encoding schemes are commonly used when there is a need to encode binary data that needs to be stored and transferred over media that are designed to deal with textual data. Base number and string converter. Image to base64 converter using javascript? But i have to achive this by using only. Loads MIME containing a base64 body and converts it to binary. bin64ed bin64ed is a binary base64 encoder/decoder that allows you to encode/decode binary files (such as im base64 binary encoder/decoder free download - SourceForge. Base64 transform and encode original data to text format. Ben Nadel looks at how to convert data between string, binary, hex, and base64 formats in ColdFusion using a few one-liner functions. To convert to a base64 encoding, use the Acrobat Net. Generate CSS and HTML codes. Prior to Java 8 it was not possible with standard java library so we had to use a 3th party library like Apache Commons-Codec or Google Guava. Base64 encoding uses only letters a-z, A-Z, 0-9 and plus, slash and equals sign characters. Fast, free, and without ads. NET ViewState Helper. I just want to know if it will by possible to retrieve binary data from a server and convert that to a base64 string. Although with other languages the conversion from a string into its binary notation ain't so quick and easy with languages like Python or C++ (using bitset<8>), it still achievable with 3 or 4 lines of code. More than 1 year has passed since last update. Re: convert image to byte array in javascript Oct 04, 2011 11:26 PM | gyana. Javascript has a built-in function named btoa() (binary-to-ascii) that you can use to perform Base64 encoding. This tool ignore newlines on hex dump. 4 and later The base64, base32, and base16 encodings convert 8 bit bytes to values with 6, 5, or 4 bits of useful data per byte. Notice how we did that in the decoding example. With this process, the attachments like images and any other media file can be converted into text and then the text sent to the destination. js If you have binary data that you need to encode to pass to the client as JSON, you can convert it to base64, a common means on the Internet to represent eight-bit values in solely printable characters. Once we have the encoded string, we call the toString() method on the string. License can be stored in files in three different format: BINARY is as the name suggests binary format BASE64 is the same as binary but encoded to be ascii using the Base64 ncoding STRING is a textual, human readable format that can be edited using text editor. Base64 is a method of encoding binary data sent as an attachment through email. Regular Base64 Uses "The Base64 Alphabet" as specified in Table 1 of RFC 4648 and RFC 2045 for encoding and decoding operation. Use strings to extract printable strings from a binary file, though ideally not on trusted files. Base64 transform and encode original data to text format. Base64 Encoding in Javascript (Works for UTF-8 strings: 8-bit bytes) The following example shows how to Base64 encode a string using the built-in btoa() function -. Just load your Base64 and it will automatically get decoded to XML. JavaScript and Node. NET Convert Methods Generally, to convert between Base64 and plain text, you should use the. I have been using base64 images for varvy (this site) for years, and it is one of the main reasons my pages load so fast. This is needed in order to support platforms like Android which already include an older version of the Apache Commons Codec (Android includes version 1. From the perspective of site security, there are three PHP functions — str_rot13(), base64_encode(), and gzinflate — that are frequently used to obfuscate malicious strings of PHP code. You can do this by converting every 2 characters in the hex string into a byte (or int) value. Base64 encoding schemes are commonly used when there is a need to encode binary data that needs to be stored and transferred over media that are designed to deal with textual data.