<?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; MD5</title>
	<atom:link href="http://www.ladysign-apps.com/blog/tag/md5/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>Migrating from Joomla to Wordpress</title>
		<link>http://www.ladysign-apps.com/blog/code/sql/migrating-from-joomla-to-wordpress/</link>
		<comments>http://www.ladysign-apps.com/blog/code/sql/migrating-from-joomla-to-wordpress/#comments</comments>
		<pubDate>Sun, 03 May 2009 09:09:29 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[joomla]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Joomla to Wordpress]]></category>
		<category><![CDATA[Mambo]]></category>
		<category><![CDATA[Mambo to Joomla]]></category>
		<category><![CDATA[MD5]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[password encryption]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[Porting]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=664</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>One of my websites is build on the CMS Joomla. These days I&#8217;m much more comfortable with Wordpress.<br />
Today I will gu[......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/sql/migrating-from-joomla-to-wordpress/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>One of my websites is build on the CMS Joomla. These days I&#8217;m much more comfortable with Wordpress.<br />
Today I will guide you, how to easy migrate from Joomla/Mambo to Wordpress.</p>
<p><strong>Migrating Articles from Mambo/Joomla to Wordpress</strong><br />
With <a href="http://www.blevins.nl/missiontech/">this wizzard from Rodney Blevins </a>you can migrate Mambo/Joomla articles and links very easy to Wordpress.<br />
Unfortunately migrating the links didn&#8217;t really work for my Wordpress 2.7.</p>
<p><em>Notice that for this wizzard, both installations of Mambo/Joomla and Wordpress need to be on the same webserver installed.</em></p>
<ol>
<li>Download the wizzard from the above link.</li>
<li>Create a new folder &#8220;export&#8221; in the root of your Wordpress installation.</li>
<li>Edit the config.php file, with the database name, username, password of Mambo/Joomla and Wordpress database settings.</li>
<li>Incase you have Joomla installed, or you changed the database prefix; you&#8217;ll have to edit the var: &#8220;$dbprefix&#8221; to your prefix. For example: &#8220;mos_&#8221; to: &#8220;jos_&#8221;.</li>
<li>Incase the database prefix for the Wordpress DB is different then &#8220;wp_&#8221;; open up the index.php file, and search / replace all: &#8220;wp_&#8221; and change it manually to your prefix. For example: &#8220;wp_&#8221; to &#8220;lee_&#8221;.</li>
<li>Now save and upload the index.php and config.php files to the export folder</li>
<li>Surf to http://your-wp-installation/export and follow the steps to import your articles or links into Wordpress.</li>
</ol>
<p><strong>Removing Mambo/Joomla tags from Wordpress posts</strong><br />
Now when your done, it could be that your Wordpress post message contain Joomla tags in the post.<br />
Tags like: &#8220;{mosimage}&#8221; or plugin based tags like: &#8220;{rokaccess}&#8221;.<br />
You can easily remove these tags from all your post with some database queries.<br />
Open phpMyAdmin and within your Wordpress database, press the SQL tab.</p>
<p>To see how many post I have with Mambo/Joomla tags, I used this query:</p>
<pre class="brush: sql; title: ;">
SELECT * FROM wp_posts WHERE post_content LIKE &amp;quot;%{%&amp;quot;
</pre>
<p>I noticed by the retrieved list, that some of my posts contain the {mosimage} tag.<br />
To remove (replace to empty string) these tags and update my posts, I used the following query:</p>
<pre class="brush: sql; title: ;">
UPDATE wp_posts SET post_content = replace(post_content, &amp;quot;{mosimage}&amp;quot;, &amp;quot;&amp;quot;);
</pre>
<p>Just another check, to see if 0 posts return, if I search in my Wordpress database for the {mosimage} tag:</p>
<pre class="brush: sql; title: ;">
SELECT * FROM wp_posts WHERE post_content LIKE &amp;quot;{mosimage}&amp;quot;
</pre>
<p><strong>Migrating users</strong><br />
The next important thing to migrate, will be the user database.<br />
Let&#8217;s compare both XML exports from phpMyAdmin, to see the table structures:</p>
<p>Joomla Export:</p>
<pre class="brush: xml; title: ;">
&amp;lt;jos_users&amp;gt;
    &amp;lt;id&amp;gt;64&amp;lt;/id&amp;gt;
    &amp;lt;name&amp;gt;Lee&amp;lt;/name&amp;gt;
    &amp;lt;username&amp;gt;Lee&amp;lt;/username&amp;gt;
    &amp;lt;email&amp;gt;my@email.nl&amp;lt;/email&amp;gt;
    &amp;lt;password&amp;gt;###&amp;lt;/password&amp;gt;
    &amp;lt;usertype&amp;gt;Super Administrator&amp;lt;/usertype&amp;gt;
    &amp;lt;block&amp;gt;0&amp;lt;/block&amp;gt;
    &amp;lt;sendEmail&amp;gt;0&amp;lt;/sendEmail&amp;gt;
    &amp;lt;gid&amp;gt;25&amp;lt;/gid&amp;gt;
    &amp;lt;registerDate&amp;gt;2007-07-25 21:57:51&amp;lt;/registerDate&amp;gt;
    &amp;lt;lastvisitDate&amp;gt;2009-05-01 18:01:52&amp;lt;/lastvisitDate&amp;gt;
    &amp;lt;activation&amp;gt;&amp;lt;/activation&amp;gt;
    &amp;lt;params&amp;gt;editor=none&amp;lt;/params&amp;gt;
&amp;lt;/jos_users&amp;gt;
</pre>
<p>Same Export in Wordpress would be:</p>
<pre class="brush: xml; title: ;">
&amp;lt;wp_users&amp;gt;
    &amp;lt;user_login&amp;gt;Lee&amp;lt;/user_login&amp;gt;
    &amp;lt;user_pass&amp;gt;&amp;lt;/user_pass&amp;gt;
    &amp;lt;user_nicename&amp;gt;Lee&amp;lt;/user_nicename&amp;gt;
    &amp;lt;user_email&amp;gt;my@email.nl&amp;lt;/user_email&amp;gt;
    &amp;lt;user_url&amp;gt;http://www.ladysign.nl&amp;lt;/user_url&amp;gt;
    &amp;lt;user_registered&amp;gt;2007-07-25 21:57:51&amp;lt;&amp;lt;/user_registered&amp;gt;
    &amp;lt;user_activation_key&amp;gt;&amp;lt;/user_activation_key&amp;gt;
    &amp;lt;user_status&amp;gt;0&amp;lt;/user_status&amp;gt;
    &amp;lt;display_name&amp;gt;Lee&amp;lt;/display_name&amp;gt;
&amp;lt;/wp_users&amp;gt;
</pre>
<p>Be replacing the table names in the export, or writing a nice script which creates a INSERT INTO query,<br />
you can prefill the Wordpress database with the users from the Mambo/Joomla user table.<br />
However, there will be one problem.</p>
<p><strong>Password encryption</strong><br />
And that problem is setting over the passwords.<br />
Joomla! 1.5 uses MD5 to hash the passwords.  When the passwords are created, they are hashed with a 32 character salt that is appended to the end of the password string.<br />
The password is stored as {TOTAL HASH}:{ORIGINAL SALT}.<br />
That&#8217;s diffrent then the MD5 encryption of Wordpress.<br />
For now I&#8217;ll solve this, by removing all the Wordpress passwords, and let the user recreate a new one via &#8216;lost password&#8217;.<br />
This is ofcourse not a nice solution. Does anyone has an idea?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/sql/migrating-from-joomla-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</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>

