<?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>Clarion Edge &#187; 3rd Party</title>
	<atom:link href="http://www.clarionedge.com/category/clarion/3rd-party/feed" rel="self" type="application/rss+xml" />
	<link>http://www.clarionedge.com</link>
	<description>Get an Edge with Clarion!</description>
	<lastBuildDate>Mon, 06 Feb 2012 13:58:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>AccessoryMenu addin now on Google Project Hosting</title>
		<link>http://www.clarionedge.com/clarion/3rd-party/accessorymenu-addin-now-on-google-project-hosting.html</link>
		<comments>http://www.clarionedge.com/clarion/3rd-party/accessorymenu-addin-now-on-google-project-hosting.html#comments</comments>
		<pubDate>Wed, 23 Feb 2011 09:55:12 +0000</pubDate>
		<dc:creator>brahn</dc:creator>
				<category><![CDATA[3rd Party]]></category>
		<category><![CDATA[Addins]]></category>

		<guid isPermaLink="false">http://www.clarionedge.com/clarion/3rd-party/accessorymenu-addin-now-on-google-project-hosting.html</guid>
		<description><![CDATA[Recently I was working with JP to make some adjustments to the AccessoryMenu addin so he could have the Accessory sub menu at the top instead of the bottom of the help menu. While I [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was working with JP to make some adjustments to the AccessoryMenu addin so he could have the Accessory sub menu at the top instead of the bottom of the help menu. While I was in there I decided to make a few more tweaks and add some support for translations.</p>
<p>I have uploaded the VS source code as well as the compiled binaries to Google Project Hosting in case anyone wants to play &#8211; <a title="https://code.google.com/p/clarion-accessory-addin/" href="https://code.google.com/p/clarion-accessory-addin/">https://code.google.com/p/clarion-accessory-addin/</a></p>
<p>Note: This has not been approved by the <a href="http://www.c3pa.com" target="_blank">Clarion 3rd Party Association</a> as an official update to the <a href="http://www.c3pa.com/standards.html#C7InstallStandards" target="_blank">Clarion7 install standard</a> so please use your common sense when considering this addin! I wanted to make the source available so that if there is interested perhaps others would like to contribute.</p>
<p>Other Note: I am also evaluating Google Project Hosting as a possible destination for the source of all the other addins. They are currently being hosted on <a title="http://www.assembla.com/" href="http://www.assembla.com/">http://www.assembla.com/</a> but the google option looks like it has pretty sweet support for open source projects which I think is what I want to do with the current addins. I would love to hear your thoughts, leave a comment or send me an email.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clarionedge.com/clarion/3rd-party/accessorymenu-addin-now-on-google-project-hosting.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Problems with J-Blowfish</title>
		<link>http://www.clarionedge.com/clarion/problems-with-j-blowfish.html</link>
		<comments>http://www.clarionedge.com/clarion/problems-with-j-blowfish.html#comments</comments>
		<pubDate>Thu, 22 Apr 2010 09:46:00 +0000</pubDate>
		<dc:creator>brahn</dc:creator>
				<category><![CDATA[3rd Party]]></category>
		<category><![CDATA[Clarion]]></category>

		<guid isPermaLink="false">http://www.clarionedge.com/?p=326</guid>
		<description><![CDATA[From http://www.strategyonline.co.za/accessories/jblowfish/
J-Blowfish is a Clarion wrapper (pure Clarion source, no black boxes) for the Blowfish  encryption algorithm. Most of this code was written by Andy Ireland  – we have added a helper class, examples, templates, [...]]]></description>
			<content:encoded><![CDATA[<p>From <a title="http://www.strategyonline.co.za/accessories/jblowfish/" href="http://www.strategyonline.co.za/accessories/jblowfish/">http://www.strategyonline.co.za/accessories/jblowfish/</a></p>
<blockquote><p>J-Blowfish is a Clarion wrapper (pure Clarion source, no black boxes) for the Blowfish  encryption algorithm. Most of this code was written by Andy Ireland  – we have added a helper class, examples, templates, etc.</p></blockquote>
<p>I learnt a lot looking into this code a few years ago (wow, it was 2006 looking at my notes!). At the time we needed an implementation of the Blowfish Encryption Algorithm to share encrypted data between a Clarion and Java application. J-Blowfish seemed like a great fit but unfortunately we found that it was not producing standard encrypted data and was also unable to decrypt anything produced by another implementation.</p>
<p>The solution at the time was to use a C DLL instead. This worked fine but seemed a bit ugly, I would have much preferred a pure clarion solution. Also, the code in  jblowfish.clw intrigued me.</p>
<p><strong>NOTE: This is just me poking around in things to learn something new. Don’t blame me if following anything in this blog sinks your submarine or whatever <img src='http://www.clarionedge.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong></p>
<h2>Here is what I found…</h2>
<p><em>(It is simpler to deal with hex output so that is the only section I have looked at but the results impact all encrypt/decrypt functions.) </em></p>
<h3>1st, Implementation problem:</h3>
<p><em>(In the &#8220;Main&#8221; procedure of BlowDemo.app) </em></p>
<p>In the demo supplied with J-Blowfish the local variable holding the key is not clipped. This means the actual key used for the Encryption is inclusive of the trailing spaces in the STRING.</p>
<p>Additionally, the blowfish <a href="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation" target="_blank">encryption mode</a> implemented in J-Blowfish (which I believe is ECB) requires your data to be a multiple of 8 bytes. The original implementation will pad an <strong><em>extra</em></strong> 8 bytes if the data is already a multiple of 8.</p>
<p>Original:</p>

<div class="wp_syntax"><div class="code"><pre class="clarion" style="font-family:monospace;">RtnEncryptHex  routine
&nbsp;
  ! Set some properties
  MyBlowfish.Key32 = loc:Key
  MyBlowfish.Size = Len(Clip(loc:Text)) + (8-(Len(Clip(loc:Text))%8))</pre></div></div>

<p>Suggested improvements:</p>

<div class="wp_syntax"><div class="code"><pre class="clarion" style="font-family:monospace;">RtnEncryptHex  routine
&nbsp;
  ! Set some properties
  MyBlowfish.Key32 = Clip(loc:Key) ! Because loc:Key is a string not cstring without the Clip() your key is including spaces
&nbsp;
  IF Len(Clip(loc:Text))%8 &gt; 0
    ! Pad the data to the nearest 8 character block
    MyBlowfish.Size = len(clip(loc:Text)) + (8-(len(clip(loc:Text))%8))
  ELSE
    ! If the data length is exactly a multiple of 8 then there is no need to pad another 8.
    MyBlowfish.Size = len(clip(loc:Text))
  END</pre></div></div>

<h3>2nd, Encryption problem (jblowfish.clw)</h3>
<p>The &#8220;BlowFish._Encrypt&#8221; method seems to be the culprit in the encryption errors I experienced.</p>
<p>In my testing I was using this data:</p>
<p><strong>key:</strong> &#8220;abc&#8221;</p>
<p><strong>plain text:</strong> &#8220;abcdefgh&#8221;</p>
<p><strong>encrypted result (other tools):</strong> &#8220;94c559d64e1251fb&#8221;</p>
<p>I discovered that if in the BlowDemo.exe I used this data, &#8220;dcbahgfe&#8221; I would get the correct result (almost&#8230; the result was also backwards &#8220;d659c594 fb51124e&#8221;)</p>
<p>So it came down to a problem with the way the data was being passed to the &#8220;self.BF_Encrypt(pWork, pWork2)&#8221; part of this method.</p>
<p>(note: the BF_Encrypt method is used successfully in the BlowFish.Initialise method, I checked the values being generated and they are all correct)</p>
<p>Basically I believe this is because the <a href="http://en.wikipedia.org/wiki/Endianness" target="_blank">Endianness</a> of clarion longs is different to whatever assumption is made in the algorithm J-.Blowfish is based upon.</p>
<p>This is what I came up with:</p>

<div class="wp_syntax"><div class="code"><pre class="clarion" style="font-family:monospace;">BlowFish._Encrypt procedure(long pData, long dwBytes)
&nbsp;
nBlocks                 long,auto
i                       long,auto
pWork                   long,auto
pWork2                  long,auto
bchar                   &amp;byte
block                   string(8)
block2                  string(8)
&nbsp;
  code
    if dwBytes % 8
      return false.
&nbsp;
    nBlocks = bshift(dwBytes, -3)
    pWork = pData
&nbsp;
    loop i = 1 to nBlocks
      pWork2 = pWork + 4
&nbsp;
      ! Reverse the order of the first 4 bytes 
      bchar &amp;= (pWork + 3)
      block[1] = Chr(bchar)
      bchar &amp;= (pWork + 2)
      block[2] = Chr(bchar)
      bchar &amp;= (pWork + 1)
      block[3] = Chr(bchar)
      bchar &amp;= (pWork + 0)
      block[4] = Chr(bchar)
      ! Reverse the order of the next 4 bytes 
      bchar &amp;= (pWork + 7)
      block[5] = Chr(bchar)
      bchar &amp;= (pWork + 6)
      block[6] = Chr(bchar)
      bchar &amp;= (pWork + 5)
      block[7] = Chr(bchar)
      bchar &amp;= (pWork + 4)
      block[8] = Chr(bchar)
&nbsp;
      !self.BF_Encrypt(pWork, pWork2) ! &lt;-- doesnt work
      self.BF_Encrypt(Address(block), Address(block)+4)
&nbsp;
      ! Now swap them back again
      block2[1] = block[4]
      block2[2] = block[3]
      block2[3] = block[2]
      block2[4] = block[1]
      block2[5] = block[8]
      block2[6] = block[7]
      block2[7] = block[6]
      block2[8] = block[5]
      ! And replace the data in &quot;BinData&quot; with the encrypted values
      Poke(pWork, block2)
&nbsp;
      pWork += 8
    end
    return true</pre></div></div>

<h3>Other considerations:</h3>
<ul>
<li><strong>This only takes care of the Encryption phase something similar will need to happen in the Decrypt method.</strong></li>
<li>There may be better ways (band, bshift, bxor, whatever) to do this but it was late and this way is at least descriptive <img src='http://www.clarionedge.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
<li>I passed a few of the standard test vectors through the changed version and it seems to work correctly now. Most implementations have in them somewhere a self test method that uses these test vectors to prove they are running correctly:
<p><a href="http://www.schneier.com/blowfish.html">http://www.schneier.com/blowfish.html</a></p>
<p><a href="http://www.schneier.com/code/vectors.txt">http://www.schneier.com/code/vectors.txt</a></li>
<li>One thing I learned (amongst many!) whilst doing all this. It seems you can safely do a search replace in jpwbfish.inc and jpwbfish.clw to replace all ULONG&#8217;s with LONG&#8217;s. This may even result in some speed improvements as supposedly longs are faster then ulongs. Reason for this is that longs are 32 bit and that is sufficient for blowfish as it works in 32 bit words. It seemed weired to me at first, its like when you do this:</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="clarion" style="font-family:monospace;">SomeProcedure PROCEDURE()
x LONG
  CODE
&nbsp;
  x = 2147483647 ! The highest value a long can take
  Message(x) ! It will show &quot;2147483647&quot;
  x += 1
  Message(x) ! It will show &quot;-2,147,483,648&quot;</pre></div></div>

<p>But blowfish doesn&#8217;t care about the +/- part as it is working directly on the bytes in the long, thus a LONG is sufficient.</p>
<p>(This explanation may be off on a few technical points but you get the drift?)</p>
<p><strong><em>I hope all the above makes (some) sense! </em></strong></p>
<p>-brahn</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clarionedge.com/clarion/problems-with-j-blowfish.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CWPlus Icon Set</title>
		<link>http://www.clarionedge.com/clarion/3rd-party/cwplus-icon-set.html</link>
		<comments>http://www.clarionedge.com/clarion/3rd-party/cwplus-icon-set.html#comments</comments>
		<pubDate>Wed, 18 Jun 2008 18:22:37 +0000</pubDate>
		<dc:creator>brahn</dc:creator>
				<category><![CDATA[3rd Party]]></category>

		<guid isPermaLink="false">http://www.clarionedge.com/?p=23</guid>
		<description><![CDATA[A slightly fancier set of icons for use with CWPlus .  I have included new icons for all the buttons on the main clarion window and a couple of updates for the window/report formatter [...]]]></description>
			<content:encoded><![CDATA[<p>A slightly fancier set of icons for use with <a href="http://www.ingasoftplus.com/" target="_blank">CWPlus</a> .  I have included new icons for all the buttons on the main clarion window and a couple of updates for the window/report formatter and embeditor.</p>
<table style="width: 90%;" border="0" cellpadding="20" align="center">
<tbody>
<tr>
<td>
<p><div id="attachment_34" class="wp-caption alignnone" style="width: 119px"><a title="Original Clarion Version" href="http://www.clarionedge.com/wp-content/uploads/cwplus_original.png"><img class="size-thumbnail wp-image-34" title="cwplus_original" src="http://www.clarionedge.com/wp-content/uploads/cwplus_original-109x109.png" alt="cwplus_original" width="109" height="109" /></a><p class="wp-caption-text">Original Clarion</p></div></td>
<td>
<p><div id="attachment_48" class="wp-caption alignnone" style="width: 119px"><a title="Default CWPlus Version" href="http://www.clarionedge.com/wp-content/uploads/cwplus_standard1.png"><img class="size-thumbnail wp-image-48" title="cwplus_standard1" src="http://www.clarionedge.com/wp-content/uploads/cwplus_standard1-109x109.png" alt="cwplus_standard1" width="109" height="109" /></a><p class="wp-caption-text">Default CWPlus</p></div></td>
<td>
<p><div id="attachment_37" class="wp-caption alignnone" style="width: 119px"><a title="ClarionEdge Set!" href="http://www.clarionedge.com/wp-content/uploads/cwplus_new.png"><img class="size-thumbnail wp-image-37" title="cwplus_new" src="http://www.clarionedge.com/wp-content/uploads/cwplus_new-109x109.png" alt="cwplus_new" width="109" height="109" /></a><p class="wp-caption-text">ClarionEdge Set</p></div></td>
</tr>
</tbody>
</table>
<div class="download">
<table border="0">
<tbody>
<tr>
<th>Download:</th>
<td><a rel="nofollow" title="Download version 0.1 of CWPlusIcons.exe" onclick="if (window.urchinTracker) urchinTracker ('http://www.clarionedge.com/downloads/3rdParty/CWPlusIcons.exe');" href="http://www.clarionedge.com/downloads/3rdParty/CWPlusIcons.exe"><img src="http://www.clarionedge.com/wp-content/plugins/drain-hole/images/download.png" alt="download" width="128" height="128"/></a> <a rel="nofollow" title="Download version 0.1 of CWPlusIcons.exe" onclick="if (window.urchinTracker) urchinTracker ('http://www.clarionedge.com/downloads/3rdParty/CWPlusIcons.exe');" href="http://www.clarionedge.com/downloads/3rdParty/CWPlusIcons.exe">CWPlusIcons.exe</a></td>
</tr>
<tr>
<th>Version:</th>
<td>0.1</td>
</tr>
<tr>
<th>Updated:</th>
<td>January 26, 2009</td>
</tr>
<tr>
<th>Size:</th>
<td>237.9 KB</td>
</tr>
<tr>
<th>Downloads:</th>
<td>283</td>
</tr>
</tbody>
</table>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.clarionedge.com/clarion/3rd-party/cwplus-icon-set.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  www.clarionedge.com/category/clarion/3rd-party/feed ) in 0.36630 seconds, on Feb 7th, 2012 at 11:22 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 7th, 2012 at 12:22 pm UTC -->
