Wednesday 18 July 2007

Boy sent £44,000 in eBay parcel

According to the Beeb, somebody slipped whilst doing their ebay packing, and instead of dropping a PS2 in the box, they accidentally put £44,000 in there instead. And sent it off to an unwitting teenager.

"Result", you might think.

But no! He phoned the police instead. I bet he does always his homework and is never home late either!

More here -> bbc news article

Wednesday 11 July 2007

Fun with Helium Balloons - Economy Class

Some nutter has just flown over 193 miles in a chair suspended from a bunch of helium balloons.

Sounds like fun...

more ->

Tuesday 10 July 2007

It's Snowing in Buenos Aires!

"Argentina's capital, Buenos Aires, has seen snow for the first time in 89 years, as a cold snap continues to grip several South American nations.

Temperatures plunged to -22C (-8F) in parts of Argentina's province of Rio Negro, while snow fell on Buenos Aires for several hours on Monday.

Two deaths from exposure were reported in Argentina and one in Chile."

I'd just like to take a moment to say "huh?"

See full article on BBC News


Thursday 5 July 2007

Live in a cave. Missed opportunity!

Dammit. I just found out I missed a chance to buy a cave to live in. With a door and windows and everything.

After all the times I've threatened to give it all up and go live in a cave somewhere I really missed the ball there *sigh*

Hermit heaven.. Photo's here :-
The £25,000 cave home

Big garden too... (according to the Beeb it sold for 100k)

Wednesday 4 July 2007

Facebook

Oh yeah, another thing. I've started using Facebook (www.facebook.com).

It's a bit irritating in many ways (mostly the "I didn't think of it first" way) but kinda funky. It may steal your life though...

Want to find me on Facebook? Just search for Dave Cozens - I'm the one with the smoking monkey.

Missing, presumed missing...

Ooops. I totally forgot this was here. But I made a post today. Woo!

I'll try to remember...

Dave

Strong Encryption in MX7

Bloody hell, that was a trial that was.

I needed to encrypt some data to transfer a user to another system using a specified encryption algorithm where the service provider has supplied both the key and the initialisation vector.

Documentation is limited at best, but after beating my head against ColdFusion and Google I finally got it to work.

And it's good to share, so here we go...

1. First you need to get the Sun Unlimited Strength Jurisdiction Policy Files for Java (SUSJPFJ?)

You can get these from http://java.sun.com/j2se/1.4.2/download.html. Unzip jce_policy-1_4_2-1.zip into {jre}\lib\security\ - but it's probably a plan to back it up first. Restart CF. You'll have to restart it again in a minute, but softly softly catchy monkey...

2. Next Stop - BouncyCastle

Go and get the latest 1.4 release of the BouncyCastle service provider files from
http://www.bouncycastle.org/latest_releases.html . Last time I looked it was bcprov-jdk14-137.jar. Drop the file into {jre}\lib\ext\

Now you have to edit
runtime\jre\lib\security\java.security to include the new service provider. Assuming that you currently have the default 5 service providers, add the following immediately below: -

security.provider.6=org.bouncycastle.jce.provider.BouncyCastleProvider


Restart CF again. You should be ready to go.

3. An Example

It would be mean to get you this far without some example code. So here goes.
Inline CFML:

<cfset stringToEncrypt ="MSISDN=5551112225,Culture=en-IE">
<cfset encryptionKey =tobase64("1BF03AB0CEF0AB4A7E793CE0")>
<cfset algorithm ="AES/CBC/PKCS7Padding">
<cfset initialisationVector = "C7D9769F6F261A41">
<cfset encrypted = Encrypt(stringToEncrypt, encryptionKey, algorithm, "Hex", initialisationVector)>

CFSCRIPT

stringToEncrypt = "ooh, ooh, it's a bit secret";
encryptionKey = tobase64("1CF03CF0CEF1CF4A7E733CE0");
algorithm = "AES/CBC/PKCS7Padding";
initialisationVector = "C6D3799F1F111A41";
encrypted = Encrypt(stringToEncrypt, encryptionKey, algorithm, "Hex", initialisationVector);