<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.nina.chat/index.php?action=history&amp;feed=atom&amp;title=Protocols%2FMSNP%2FTCL_%28Challenge_Implementation%29</id>
	<title>Protocols/MSNP/TCL (Challenge Implementation) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.nina.chat/index.php?action=history&amp;feed=atom&amp;title=Protocols%2FMSNP%2FTCL_%28Challenge_Implementation%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.nina.chat/index.php?title=Protocols/MSNP/TCL_(Challenge_Implementation)&amp;action=history"/>
	<updated>2026-06-26T12:08:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.nina.chat/index.php?title=Protocols/MSNP/TCL_(Challenge_Implementation)&amp;diff=4379&amp;oldid=prev</id>
		<title>Animadoria at 13:54, 15 May 2022</title>
		<link rel="alternate" type="text/html" href="https://wiki.nina.chat/index.php?title=Protocols/MSNP/TCL_(Challenge_Implementation)&amp;diff=4379&amp;oldid=prev"/>
		<updated>2022-05-15T13:54:31Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:54, 15 May 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Protocols/MSNP}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         proc CreateQRYHash {chldata} {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         proc CreateQRYHash {chldata} {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki-wiki_:diff:1.41:old-4107:rev-4379:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Animadoria</name></author>
	</entry>
	<entry>
		<id>https://wiki.nina.chat/index.php?title=Protocols/MSNP/TCL_(Challenge_Implementation)&amp;diff=4107&amp;oldid=prev</id>
		<title>Animadoria: Fix formatting</title>
		<link rel="alternate" type="text/html" href="https://wiki.nina.chat/index.php?title=Protocols/MSNP/TCL_(Challenge_Implementation)&amp;diff=4107&amp;oldid=prev"/>
		<updated>2022-02-05T03:22:28Z</updated>

		<summary type="html">&lt;p&gt;Fix formatting&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:22, 5 February 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &amp;lt;nowiki&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         proc CreateQRYHash {chldata} {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         proc CreateQRYHash {chldata} {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 set prodid &amp;quot;PROD0090YUAUV\{2B&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 set prodid &amp;quot;PROD0090YUAUV\{2B&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l100&quot;&gt;Line 100:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 101:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 return $hex&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 return $hex&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/nowiki&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:MSN]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:MSN]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Protocols/MSNP]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Protocols/MSNP]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Work_In_Progress]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Work_In_Progress]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki-wiki_:diff:1.41:old-2697:rev-4107:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Animadoria</name></author>
	</entry>
	<entry>
		<id>https://wiki.nina.chat/index.php?title=Protocols/MSNP/TCL_(Challenge_Implementation)&amp;diff=2697&amp;oldid=prev</id>
		<title>AD: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.nina.chat/index.php?title=Protocols/MSNP/TCL_(Challenge_Implementation)&amp;diff=2697&amp;oldid=prev"/>
		<updated>2020-05-29T00:23:47Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:23, 29 May 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wiki-wiki_:diff:1.41:old-2696:rev-2697 --&gt;
&lt;/table&gt;</summary>
		<author><name>AD</name></author>
	</entry>
	<entry>
		<id>https://wiki.nina.chat/index.php?title=Protocols/MSNP/TCL_(Challenge_Implementation)&amp;diff=2696&amp;oldid=prev</id>
		<title>AD at 18:24, 20 September 2005</title>
		<link rel="alternate" type="text/html" href="https://wiki.nina.chat/index.php?title=Protocols/MSNP/TCL_(Challenge_Implementation)&amp;diff=2696&amp;oldid=prev"/>
		<updated>2005-09-20T18:24:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;        proc CreateQRYHash {chldata} {&lt;br /&gt;
                set prodid &amp;quot;PROD0090YUAUV\{2B&amp;quot;&lt;br /&gt;
                set prodkey &amp;quot;YMM8C_H7KCQ2S_KL&amp;quot;&lt;br /&gt;
&lt;br /&gt;
                # Create an MD5 hash out of the given data, then form 32 bit integers from it&lt;br /&gt;
                set md5hash [::md5::md5 -hex $chldata$prodkey]&lt;br /&gt;
                set md5parts [MD5HashToInt $md5hash]&lt;br /&gt;
&lt;br /&gt;
                # Then create a valid productid string, divisable by 8, then form 32 bit integers from it&lt;br /&gt;
                set nrPadZeros [expr 8 - [string length $chldata$prodid] % 8]&lt;br /&gt;
                set padZeros [string repeat 0 $nrPadZeros]&lt;br /&gt;
                set chlprodid [CHLProdToInt $chldata$prodid$padZeros]&lt;br /&gt;
&lt;br /&gt;
                # Create the key we need to XOR&lt;br /&gt;
                set key [KeyFromInt $md5parts $chlprodid]&lt;br /&gt;
&lt;br /&gt;
                set low 0x[string range $md5hash 0 15]&lt;br /&gt;
                set high 0x[string range $md5hash 16 32]&lt;br /&gt;
                set low [expr {$low ^ $key}]&lt;br /&gt;
                set high [expr {$high ^ $key}]&lt;br /&gt;
&lt;br /&gt;
                set p1 [format %8.8x [expr {$low / 0x100000000}]]&lt;br /&gt;
                set p2 [format %8.8x [expr {$low % 0x100000000}]]&lt;br /&gt;
                set p3 [format %8.8x [expr {$high / 0x100000000}]]&lt;br /&gt;
                set p4 [format %8.8x [expr {$high % 0x100000000}]]&lt;br /&gt;
&lt;br /&gt;
                return $p1$p2$p3$p4&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        proc KeyFromInt { md5parts chlprod } {&lt;br /&gt;
                # Create a new series of numbers&lt;br /&gt;
                set key_temp 0&lt;br /&gt;
                set key_high 0&lt;br /&gt;
                set key_low 0&lt;br /&gt;
&lt;br /&gt;
                # Then loop on the entries in the second array we got in the parameters&lt;br /&gt;
                for {set i 0} {$i &amp;lt; [llength $chlprod]} {incr i 2} {&lt;br /&gt;
&lt;br /&gt;
                        # Make $key_temp zero again and perform calculation as described in the documents&lt;br /&gt;
                        set key_temp [lindex $chlprod $i]&lt;br /&gt;
                        set key_temp [expr {(wide(0x0E79A9C1) * wide($key_temp)) % wide(0x7FFFFFFF)}]&lt;br /&gt;
                        set key_temp [expr {wide($key_temp) + wide($key_high)}]&lt;br /&gt;
                        set key_temp [expr {(wide([lindex $md5parts 0]) * wide($key_temp)) + wide([lindex $md5parts 1])}]&lt;br /&gt;
                        set key_temp [expr {wide($key_temp) % wide(0x7FFFFFFF)}]&lt;br /&gt;
&lt;br /&gt;
                        set key_high [lindex $chlprod [expr {$i+1}]]&lt;br /&gt;
                        set key_high [expr {(wide($key_high) + wide($key_temp)) % wide(0x7FFFFFFF)}]&lt;br /&gt;
                        set key_high [expr {(wide([lindex $md5parts 2]) * wide($key_high)) + wide([lindex $md5parts 3])}]&lt;br /&gt;
                        set key_high [expr {wide($key_high) % wide(0x7FFFFFFF)}]&lt;br /&gt;
                        set key_low [expr {wide($key_low) + wide($key_temp) + wide($key_high)}]&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                set key_high [expr {(wide($key_high) + wide([lindex $md5parts 1])) % wide(0x7FFFFFFF)}]&lt;br /&gt;
                set key_low [expr {(wide($key_low) + wide([lindex $md5parts 3])) % wide(0x7FFFFFFF)}]&lt;br /&gt;
&lt;br /&gt;
                set key_high 0x[byteInvert [format %8.8X $key_high]]&lt;br /&gt;
                set key_low 0x[byteInvert [format %8.8X $key_low]]&lt;br /&gt;
&lt;br /&gt;
                set long_key [expr {(wide($key_high) &amp;lt;&amp;lt; 32) + wide($key_low)}]&lt;br /&gt;
&lt;br /&gt;
                return $long_key&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Takes an CHLData + ProdID + Padded string and chops it in 4 bytes. Then converts to 32 bit integers&lt;br /&gt;
        proc CHLProdToInt { CHLProd } {&lt;br /&gt;
                set hexs {}&lt;br /&gt;
                set result {}&lt;br /&gt;
                while {[string length $CHLProd] &amp;gt; 0} {&lt;br /&gt;
                        lappend hexs [string range $CHLProd 0 3]&lt;br /&gt;
                        set CHLProd [string range $CHLProd 4 end]&lt;br /&gt;
                }&lt;br /&gt;
                for {set i 0} {$i &amp;lt; [llength $hexs]} {incr i} {&lt;br /&gt;
                        binary scan [lindex $hexs $i] H8 int&lt;br /&gt;
                        lappend result 0x[byteInvert $int]&lt;br /&gt;
                }&lt;br /&gt;
                return $result&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        # Takes an MD5 string and chops it in 4. Then &amp;quot;decodes&amp;quot; the HEX and converts to 32 bit integers. After that it ANDs&lt;br /&gt;
        proc MD5HashToInt { md5hash } {&lt;br /&gt;
                binary scan $md5hash a8a8a8a8 hash1 hash2 hash3 hash4&lt;br /&gt;
                set hash1 [expr &amp;quot;0x[byteInvert $hash1]&amp;quot; &amp;amp; 0x7FFFFFFF]&lt;br /&gt;
                set hash2 [expr &amp;quot;0x[byteInvert $hash2]&amp;quot; &amp;amp; 0x7FFFFFFF]&lt;br /&gt;
                set hash3 [expr &amp;quot;0x[byteInvert $hash3]&amp;quot; &amp;amp; 0x7FFFFFFF]&lt;br /&gt;
                set hash4 [expr &amp;quot;0x[byteInvert $hash4]&amp;quot; &amp;amp; 0x7FFFFFFF]&lt;br /&gt;
&lt;br /&gt;
                return [list $hash1 $hash2 $hash3 $hash4]&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        proc byteInvert { hex } {&lt;br /&gt;
                set hexs {}&lt;br /&gt;
                while {[string length $hex] &amp;gt; 0} {&lt;br /&gt;
                        lappend hexs [string range $hex 0 1]&lt;br /&gt;
                        set hex [string range $hex 2 end]&lt;br /&gt;
                }&lt;br /&gt;
                set hex &amp;quot;&amp;quot;&lt;br /&gt;
                for {set i [expr [llength $hexs] -1]} {$i &amp;gt;= 0} {incr i -1} {&lt;br /&gt;
                        append hex [lindex $hexs $i]&lt;br /&gt;
                }&lt;br /&gt;
                return $hex&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
[[Category:MSN]]&lt;br /&gt;
[[Category:Protocols/MSNP]]&lt;br /&gt;
[[Category:Work_In_Progress]]&lt;/div&gt;</summary>
		<author><name>AD</name></author>
	</entry>
</feed>