<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ladysign Dev Blog &#187; encoding</title>
	<atom:link href="http://www.ladysign-apps.com/blog/category/code/encoding/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ladysign-apps.com/blog</link>
	<description>Girls can code.</description>
	<lastBuildDate>Mon, 12 Dec 2011 16:58:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Image base64 uri strings</title>
		<link>http://www.ladysign-apps.com/blog/code/css/image-base64-uri-strings/</link>
		<comments>http://www.ladysign-apps.com/blog/code/css/image-base64-uri-strings/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 19:43:49 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[generators]]></category>
		<category><![CDATA[generator]]></category>
		<category><![CDATA[image base64 strings]]></category>

		<guid isPermaLink="false">http://www.ladysign-apps.com/blog/?p=993</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>By using the Data URI scheme you can embed images directly into your HTML and CSS. It works by encoding an image into a b[......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/css/image-base64-uri-strings/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>By using the Data URI scheme you can embed images directly into your HTML and CSS. It works by encoding an image into a base64 string and place it directly withing an HTML image tag or as a CSS background URL. Such a base64 string url example in your CSS looks like this:</p>
<pre class="brush: css; title: ;">
div.image {
 background: data:image/x-png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAABLElEQVR42qSTQStFURSFP7f3XygyoAwoYSYMPCIpk2egMFSmUvwCRpSRDIwYGbwyVuYykB9y914m951z7nHe6J26dc9u77XXWmdvJLF7/audqx9JYuvyW92LL0li8K2df2r17CPEVk7ftXTclyQqAMmRCwC5I3fS42a4W7y74VYDNAAuJA8AaXIsSACsDgAdAJeFrnnyoMBygKZJJ3b1It0AmsTMDPdEgrujJqHEwCxqznMaD2KgyCDRnEuo8qJhHvx/hcQDbzGoix5Yi4G1TcwZWNEDKwJU+WDkhg2ToDaD+M65YcVB8jg3Y5IY5VQAyyf9gLJw+CqAuYNnAczsPQpgevtBU937kDexcdssj8Ti0ZskMd97CRs3u//U2sjJzbtwH1+/Cf8jS/gbAMmWc42HzdIjAAAAAElFTkSuQmCC
}
</pre>
<p>I found this generator who generates such a string after uploading an image.<br />
I used this for iPhone/iPad app development.</p>
<p><a href="http://webcodertools.com/imagetobase64converter">http://webcodertools.com/imagetobase64converter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/css/image-base64-uri-strings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unicode converter</title>
		<link>http://www.ladysign-apps.com/blog/code/encoding/unicode-converter/</link>
		<comments>http://www.ladysign-apps.com/blog/code/encoding/unicode-converter/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 09:44:28 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[encoding]]></category>
		<category><![CDATA[encoding euro sign]]></category>
		<category><![CDATA[json utf-8]]></category>
		<category><![CDATA[utf-8]]></category>

		<guid isPermaLink="false">http://www.ladysign-apps.com/blog/?p=971</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>I found a handy unicode converter online. This might become handy when for encoding UTF-8 characters in Javascript/JSON o[......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/encoding/unicode-converter/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>I found a handy unicode converter online. This might become handy when for encoding UTF-8 characters in Javascript/JSON objects. (such as for example the &euro; sign. which becomes: &#8220;\u20ac&#8221;</p>
<p><a href="http://people.w3.org/rishida/scripts/uniview/conversion.php">http://people.w3.org/rishida/scripts/uniview/conversion.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/encoding/unicode-converter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a logout button in Joomla 1.5</title>
		<link>http://www.ladysign-apps.com/blog/code/encoding/create-a-logout-button-in-joomla-1-5/</link>
		<comments>http://www.ladysign-apps.com/blog/code/encoding/create-a-logout-button-in-joomla-1-5/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 12:33:10 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[encoding]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[Base64]]></category>
		<category><![CDATA[converter]]></category>
		<category><![CDATA[Joomla 1.5]]></category>
		<category><![CDATA[logout]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=778</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>In Joomla 1.5, you need to press the logout button within the login component, to log off your session.<br />
This logic doesn&#038;[......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/encoding/create-a-logout-button-in-joomla-1-5/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>In Joomla 1.5, you need to press the logout button within the login component, to log off your session.<br />
This logic doesn&#8217;t seem very clear for me. If I want to log-off I don&#8217;t want 2 page clicks/refreshes.</p>
<p>To create a logout button or menu link, you just need to invoke the logout URL part:</p>
<pre class="brush: jscript; title: ;">index.php?option=com_user&amp;task=logout&amp;return=Lw==</pre>
<p>Or incase when you have Search Engine Friendly (SEF) URL&#8217;s:</p>
<pre class="brush: jscript; title: ;">/logout.html?return=Lw</pre>
<p>Now did you note, the return=Lw== parameter?<br />
This parameter is for bringing you back to the return page, after logging out.<br />
The &#8220;Lw==&#8221;-value, is a Base64 encoding for &#8220;/&#8221; which brings you back to the root of the page.</p>
<p>Say that you don&#8217;t want to forward to the root, but to the &#8216;/goodbye/index.html&#8217; page?<br />
You will need the Base64 encoding of this string:</p>
<pre class="brush: jscript; title: ;">/logout.html?return=L2dvb2RieWUvaW5kZXguaHRtbA==</pre>
<p>Well, here&#8217;s your help, I found <a href="http://www.motobit.com/util/base64-decoder-encoder.asp">a nice online Base64 converter</a>, which does this job for you.</p>
<p>Check out<a href="http://www.sandranasicfans.eu/sandranasic/"> my website</a> to see it working in a Joomla 1.5 page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/encoding/create-a-logout-button-in-joomla-1-5/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>HTML Entities</title>
		<link>http://www.ladysign-apps.com/blog/code/encoding/html-entities/</link>
		<comments>http://www.ladysign-apps.com/blog/code/encoding/html-entities/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 11:00:49 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[encoding]]></category>
		<category><![CDATA[correct html encoding]]></category>
		<category><![CDATA[html entities]]></category>
		<category><![CDATA[lookup]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=498</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>Using HTML entities is the right way to ensure all the characters on your page are validated.<br />
Sometimes, it&#8217;s reall[......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/encoding/html-entities/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>Using HTML entities is the right way to ensure all the characters on your page are validated.<br />
Sometimes, it&#8217;s really irritating to Google for the correct encoded HTML Entity,<br />
or scroll through a list of 250 HTML Entity mappings.</p>
<p>I found a really <a href="http://leftlogic.com/lounge/articles/entity-lookup" target="_blank">cool entity look-up tool</a> which takes this pain away!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/encoding/html-entities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MD5 Encryptor</title>
		<link>http://www.ladysign-apps.com/blog/code/encoding/md5-encryptor/</link>
		<comments>http://www.ladysign-apps.com/blog/code/encoding/md5-encryptor/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 10:27:12 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[encoding]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[MD5]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=190</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>In software you don&#8217;t want all information user-readable in the POST or GET request. Therefore<br />
you need to encrypt [......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/encoding/md5-encryptor/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>In software you don&#8217;t want all information user-readable in the POST or GET request. Therefore<br />
you need to encrypt your info&#8217;s. This can be done by MD5 (Message-Digest algorithm 5).<br />
A widely used, partially insecure cryptographic hash function with a 128-bit hash value. As an Internet standard (RFC 1321), MD5 has been employed in a wide variety of security applications, and is also commonly used to check the integrity of files. An MD5 hash is typically expressed as a 32 digit hexadecimal number.</p>
<p>For example: </p>
<pre class="brush: jscript; title: ;">
MD5(&quot;Pa's wijze lynx bezag vroom het fikse aquaduct&quot;) = b06c0444f37249a0a8f748d3b823ef2a
</pre>
<p>I will post you a pseudo code for building MD5 formula&#8217;s, but of course there are already tools on the internet:<br />
<a href="http://hash-it.net/" target="_blank">Online MD5 Encryptor<br />
<a href="http://www.iwebtool.com/md5?string=yourpassword" target="_blank">Online MD5 Encryptor</a></p>
<p>Pseudo code &#8211; MD5 hash:</p>
<pre class="brush: jscript; title: ;">
//Note: All variables are unsigned 32 bits and wrap modulo 2^32 when calculating
var int[64] r, k

//r specifies the per-round shift amounts
r[ 0..15] := {7, 12, 17, 22,  7, 12, 17, 22,  7, 12, 17, 22,  7, 12, 17, 22}
r[16..31] := {5,  9, 14, 20,  5,  9, 14, 20,  5,  9, 14, 20,  5,  9, 14, 20}
r[32..47] := {4, 11, 16, 23,  4, 11, 16, 23,  4, 11, 16, 23,  4, 11, 16, 23}
r[48..63] := {6, 10, 15, 21,  6, 10, 15, 21,  6, 10, 15, 21,  6, 10, 15, 21}

//Use binary integer part of the sines of integers (Radians) as constants:
for i from 0 to 63
    k[i] := floor(abs(sin(i + 1)) Ã— (2 pow 32))

//Initialize variables:
var int h0 := 0x01234567
var int h1 := 0x89ABCDEF
var int h2 := 0xFEDCBA98
var int h3 := 0x76543210

//Pre-processing:
append &quot;1&quot; bit to message
append &quot;0&quot; bits until message length in bits â‰¡ 448 (mod 512)
append bit /* bit, not byte */ length of unpadded message as 64-bit little-endian integer to message

//Process the message in successive 512-bit chunks:
for each 512-bit chunk of message
    break chunk into sixteen 32-bit little-endian words w[i], 0 â‰¤ i â‰¤ 15

    //Initialize hash value for this chunk:
    var int a := h0
    var int b := h1
    var int c := h2
    var int d := h3

    //Main loop:
    for i from 0 to 63
        if 0 â‰¤ i â‰¤ 15 then
            f := (b and c) or ((not b) and d)
            g := i
        else if 16 â‰¤ i â‰¤ 31
            f := (d and b) or ((not d) and c)
            g := (5Ã—i + 1) mod 16
        else if 32 â‰¤ i â‰¤ 47
            f := b xor c xor d
            g := (3Ã—i + 5) mod 16
        else if 48 â‰¤ i â‰¤ 63
            f := c xor (b or (not d))
            g := (7Ã—i) mod 16

        temp := d
        d := c
        c := b
        b := b + leftrotate((a + f + k[i] + w[g]) , r[i])
        a := temp

    //Add this chunk's hash to result so far:
    h0 := h0 + a
    h1 := h1 + b
    h2 := h2 + c
    h3 := h3 + d

var int digest := h0 append h1 append h2 append h3 //(expressed as little-endian)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/encoding/md5-encryptor/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

