Sunday, December 11, 2005

typo Live Search

Typo, the Ruby-based blog engine that I am using, has a cool "Live Search" feature (i.e. search as you type by using Ajax). However, it doesn't work with multibyte characters. I fixed it with modifying the Javascript from "escape($F('q'))" to "encodeURIComponent($F('q'))"... Then when trying to submit it through Trac, I found it has already been submitted :P

Ripping audio CD with EAC

So far, I found EAC to be the best CD ripping tools... use it with lame to get the best quality mp3. My personal favourite command-line options:

-V 0 --vbr-new -b 128 -h %s %d

Monday, December 5, 2005


Found a nice looking volume knob for my A47 headamp.

Also, the PIMETA is almost done too. Still waiting for the AD843 op-amp. Couldn't find the right volume knob so borrow it from the A47 for photo taking :P

Saturday, November 26, 2005


this are the posts i replied on a forum when we were chatting about "全面普選"

我都希望見到全面民主, 但好怕見到 d 咩都反對, 非友即敵的"民主派"... 橫睇豎睇都似一(民主)黨專政多過自由民主.



我指的"專政"並非指 political ruling, 是指他們的非友即敵, 容不下其它聲音的做事方式. e.g. 一碰到唔同聲音的 phone-in 就 cut 人線的開咪人, 我就不覺得佢做法係民主喇

e.g. 一到選舉就會有 d 旅遊車車 d 公公婆婆去投票, 之後就有餐食. 做既"光名正大", 受既又大條道理... 咁就真係做到一人一票既民主? 咁樣選法, 我真係驚到時一人一票選特首會選左個廢柴出黎 ... 太多人唔真惜自己手頭上的一票喇

如果係做 true or false 問題, 一係專政, 一係民主的話, 我當然會要民主. 但世事唔一定係得黑同白, 可以係灰色的.

如果現在即刻普選特首的話, 有幾多人有諗過選完之後要點? 個政府應該點 run? 如果佢唔得民心, 應唔應該好易推番佢落黎? 如果係咁, 佢會唔會做咩都要"聽下民意先", 成日議而不決?

上次選舉時, 台灣的陳生原本係民意中落後, 但—個"槍擊"就令佢連任... 民意真係咁易就可以左右? 一個 911, 做就布殊連任. 但到係伊拉克攪到一鍋泡, 民意創新低, 你又估佢可唔可以做到任期完? 有時都覺得幾諷刺, 老董因為北大人"升佢上神枱", 香港人反而唔洗等到佢任期完... 唉... 真係諗爆頭都唔明

我係想要民主, 但要係成熟既民主. 有時我硬係覺得有d政客為一己利益係到不停吹風...

問題係"誰會出來選?"... 假如我地選左個 100% 民主反共既人出黎, 香港有高度民主自由, 但係同北方反曬臉, 中央唔俾 jetso 香港, 經濟一落千丈, 咁會點? 香港會唔會慢慢分化, 幾次革命之後會走左去行共產? 好驚 :P

又如果一個唔覺意, 選左個一味親中的話就大檸樂 (個人意見)... 唔好忘記, 現時香港政壇上的重量級人馬大多親中

我覺得要有唔同聲音/政黨, 大家實力差不多, 而選民又理性的話, 普選才有意思. 否則只係某 d 人做 show. 所以我支持慢慢來.

Tuesday, November 22, 2005


玩左一排 Ruby, 今日開始試 Ruby on Rails... 用泥起 web apps 又幾簡單喎... at least for "hello world" apps 喇 :p

夜半無聊, 一路上網一路用 tv tuner 在電視台間左跳右跳. 忽然聽到一首不錯的歌, 原來播緊蔡依林的許願池的希臘少女. 上網 search, 哈~, 原來是王菀之作曲的呢~~

Monday, November 21, 2005

王菀之 I love my name

早兩日買左王菀之的 I love my name. 她大部分的歌的旋律並非我所喜歡的類型, 但 Ivana 的輕柔聲線很耐聽... 此碟也沒有讓我失望 :) 不過還是喜歡聽她唱”臉紅”一類的歌...


Warning: I only tested this program on Palm OS 5.2 (my Tungsten C) and 4.0 (simulators). Use at your own risk!

What is MemoAES?

The Memo application on Palm lacked a real security feature. Sure, there is a "Security" option to protect selected memos for privacy. But all it does is just "hiding" the memos. By no mean the memos are protected from any experienced Palm user to read them.

Back in the old Palm III days, I started using a free application called Safe. Its interface is exactly like the build-in Memo application, and I believe it is because the application is based on the modified source code of Memo. Safe different from Memo in just one feature: the ability to encrypt the memos. A user pick a password at the first run of the program. Then individual memo can be selected for encryption.

One thing I liked the program is that since the encrypted memo can be synchronized to computers, I can decrypt the memo easily. In fact, I actually wrote a desktop Java application so that I can decrypt and read the encrypted memos.

I liked the program so much that I was still using it when I switched to Tungsten C. But recently I decided to implement something similar for myself to use.

Why re-inventing the wheel?

Several reasons:

  • Safe uses the Triple DES encryption. This algorithm is now considered to be outdated and is not very good against brute force attacks.

  • There was no update version of Safe for many years. The last release was in 1999 and probably based on a quite old version of Memo. The newer version of Memo has many bugs fixed (and has a nice icon in color too!)

  • I have too much time to kill :P

From the implementation point of view, it shouldn't be that hard. Palm is nice enough to include the source code of Memo in the SDK. And many encryption libraries are available for Palm. I choosed the AESLib not only because it is already installed on my Palm, but also AES is a promising encryption algorightm.


The first time you run the program, you need to define the password.

Create your memo as usual. If you want to encrypt this memo, enable it in the Details dialog.

List view of memos.

Every time you entered the password to encrypt or decrypt a memo, the password is memorized for that session so you don't need to re-enter it. But once you leave the application and come back later to open an encrypted memo or try to create a new encrypted memo, you will be prompted for the password.

You can open the encrypted memo with the build-in Memo application. But all you will see is something like garbage.

For geeks only:

  • The hex string inside the squre barcket is the MD5 hash of the original content

  • The encrypted content is stored in Base64 format

  • You could copy-and-paste the base64 encoded text to other programs to decode it and then decrypt it with the standard AES algorithm


I created this application for my own use only. There will be NO technical supported from me. No gurantee whatsoever. Use at your own risk.

  • MemoAES depends on AESLib for the encryption. You can get it from the offical site or here.

  • Download MemoAES itself

  • Install both files to your palm

License of AESLib
 Copyright (c) 2003, Copera, Inc., Mountain View, CA, USA.
 All rights reserved.


 The free distribution and use of this software in both source and binary
 form is allowed (with or without changes) provided that:

   1. distributions of this source code include the above copyright
      notice, this list of conditions and the following disclaimer;

   2. distributions in binary form include the above copyright
      notice, this list of conditions and the following disclaimer
      in the documentation and/or other associated materials;

   3. the copyright holder's name is not used to endorse products
      built using this software without specific written permission.


 This software is provided 'as is' with no explcit or implied warranties
 in respect of any properties, including, but not limited to, correctness
 and fitness for purpose.
 Issue Date: March 10, 2003

Rolleiflex and Rolleicord TLR (Oct 2003)

My first medium format camera was a twin lens reflex (TLR) camera. TLR cameras have separate lenses for viewing the scene and taking photo. The image from the viewing lens reflects by mirror onto a ground glass with the image reversed left-right. It takes some time to get used to.

While deciding which TLR to buy, I did a little research on the Rolleiflex and Rolleicord. The following is my findings that I hope you will find useful when choosing your Rollei TLR.

BTW, I finally picked a Rolleicord V with Xenar 75/3.5 as my first TLR.

Rolleiflex and Rolleicord

Rolleiflex was first introduced around 1928. The original Rolleiflex had either a 75/4.5 or a 75/3.8 taking lens. Subsequent Automat and E/T/F models had 75/3.5 lenses. In 1949, another series, the Rolleiflex 2.8, was introduced with 80/2.8 lenses.

Besides the Rolleiflex lineups, there is also a low cost camera series - Rolleicord - introduced in 1933. These cameras were targeted toward the budgeted users. Cranks were replaced with winding knobs for film advance. Also the shutter need to be cocked separately.


Different models of Rolleiflex and Rolleicord TLRs are fitted with different taking lenses:

Zeiss Triotar

Triotar is a 3 elements lens. It is usually found on pre-war models and usually not coated. Soft at the corners, even when stopped down. Maybe not suitable for landscapes, but many photographers love to use it for portraits.

Zeiss Tessar

The famous Zeiss design. 4 elements in 3 groups. The post-war version is usually coated. Image quality is acceptable even when wide-open. Becomes very good after f8 or f11.

Schneider Xenar

Schneider's copy of Tessar. Both Tessar and Xenar share the same design.

Zeiss Planar

Available in 75/3.5 and 80/2.8 versions. The 75/3.5 version is either 5 or 6 elements in 4 groups. The 80/2.8 version is 5 elements in 4 groups.

Schneider Xenotar

Both the 75/3.5 and the 80/2.8 versions are of 5 elements, 4 groups design.

Which One to Buy?

First, ignore all the confusing models. Simply pick the lens your want. But which lens is better? It is commonly agreed that, at least when judged by sharpness, Planar/Xenator is better than Tessar/Xenar which in turn better than Tritor. But there are endless debates between Planar vs Xenator and Tessar vs Xenar.

My advice is: unless you are a collector, need to shoot in low light, or very into TLR, otherwise choose either the Tessar or Xenar 3.5 versions. They are priced more reasonable and good enough for most users. But if you can afford it, of course you won't go wrong with Planar/Xenotar 3.5 or even the 2.8. Choose Triotar if you are on a tight budget.

Once you figured out which class of lens to go with, I suggest you to forget Planar vs Xenator, or Tessar vs Xenar. I don't think you will find any different in daily use, unless you like to shoot newspaper to look for sharpness.

Next is to choose whether you want a Rolleiflex or a Rolleicord. Rolleiflex models are priced higher. Some people think the winding crank on Rolleiflex is easier to work with than the knob on Rolleicord. But I actually find the knob to be more user friendly for handheld. I also prefer the Rolleicord that requires separate action for cocking the shutter. I found it more logical to cock the shutter just before taking a picture. Anyway, you mileage may vary.

The best place to find a used TLR is on Internet auction sites. There are usually plenty of them to choose from. And they are usaully reasonably priced, except those collectable models.

Look for cameras with clean glass, working shutter, smooth film transport, and most importantly -- the one that is priced reasonably. Don't get too excited on a particular item and place bid that is higher than the set price in your mind. Remember, there are plenty of TLRs out there.

Personally, I would suggest to go with at least a Rolleicord V. Cameras older that this model are usually beaten to death. Note that in Rolleicord, only the Vb model has a user changable viewfinder and screen, if that is important to you. Also, when you are buying a 30+ years old camera, forget about the built-in lightmeter, if there is one. It is usually not in working order or inaccurate. You are better off with a handheld meter.

And finally, if you can't find a Rolleflex or Rolleicord suitable for you, there are still many choices out there. Some of my suggestions are Minolta Autocord, Zeiss Ikon, Yashica etc. Stay tune for more of my reviews on these TLRs.

Tips on Using a TLR

  • Stop down. Nearly all TLR cameras produce reasonably sharp images when stopped down.

  • Use a cable release, even when handheld. For TLR, it is hard to fire shutter while trying to keep the camera steady. Use a cable release to avoid shaking.

  • Use a shade, if you can find one. These old lenses are prone to flare.

  • For Rolleicord, when the shutter is cocked, don't move the lever to or away from 1/500. The 1/500 second speed requires a separate high-power string to fire the shutter. When cocked, the shutter may be damaged if switching to or from 1/500. If you really need to change the speed and the shutter is already cocked, cover the lens and fire the shutter. Then enable the double exposure function, select your intended speed, cock the shutter, and take your photo.

Model References

Model Year Serial Number Lens Others
Original 1928 1 - 199.999 Zeiss Tessar 75/4.5 or 75/3.8
Standard 1932 200.000 - 567.000 Zeiss Tessar 75/3.5
Automat 1 1937 568.516 - 805.000 Zeiss Tessar 75/3.5
Automat 2 1939 805.000 - 1.050.000
New Standard 1939 805.000 - 927.999
Automat 3 1945 1.050.000 - 1.099.999
Automat X 1949 1.000.000 - 1.168.000
Automat 4 1951 1.200.000 - 1.427.999 Zeiss Opton Tessar 75/3.5
3.5 MX-EVS 1954 1.428.001- 1.479.999
1.479.000 - 1.739.999
Zeiss Opton Tessar 75/3.5, Zeiss Jena Tessar 75/3.5 or Schneider Xenar 75/3.5
3.5E 1956 1.740.000 - 1.787.849 with lightmeter
3.5E 1956 1.850.000 - 1.868.442 without lightmeter
3.5E2 1959 1.870.000 - 1.872.010
2.480.000 - 2.482.999
3.5E3 1961 2.380.000 - 2.385.034
T1 1958 2.100.000 - 2.199.999
T2 (version 1) 1966 2.220.000 - 2.228.999
T2 (version 2) 1968 2.242.000 - 2.249.999
2.310.000 - 2.314.999
T3 1971 2.315.000 - 2.319.999
2.320.000 - 2.320.300
3.5F1 1958 2.200.000 - 2.219.999
3.5F2 1960 2.230.000 - 2.241.500
3.5F3 1960 2.250.000 - 2.299.999
(2.299.546 ?)
3.5F4 1965 2.800.000 - 2.844.999
3.5F5 1979 2.845.000 - 2.870.149
3.555.000 - 3.559.999

Model Year Serial Number Lens Others
I (art deco) 1933 1.460.000 - 1.759.000
I 1934 1.590.000 - 1.759.999
Ia 1936 1.760.000 - 1.947.000 Zeiss Triotar 4.5
Ia2 1937 1.966.000 - 2.124.000
Ia3 1939 611.000 - 1.042.999
II 1936 1.758.000 - 1.973.999
IIa 1937 1.260.000 - 1.457.405
IIb 1938 612.000 - 858.999
IIc 1939 859.000 - 1.006.999
IId 1949 1.007.000 - 1.134.999
IIe 1949 1.135.000 - 1.135.999
III 1952 1.137.000 - 1.344.050 Schneider Xenar 75/3.5
IV 1952 1.344.051 - 1.390.999
V 1954 1.500.000 - 1.583.999 Schneider Xenar 75/3.5
Va 1957 1.584.000 - 1.599.999
Va2 1958 1.900.000 - 1.943.999
Vb 1962 2.600.000 - 2.649.999 Schneider Xenar 75/3.5 user
Vb2 1970 2.650.000 - 2.665.999 Schneider Xenar 75/3.5

Rolleiflex 2.8
Model Year Serial Number Lens Others
2.8A Type 1 1949 1.101.000 - 1.114.999 Zeiss Jena Tessar shutter 1/500
2.8A Type 1 1949 1.115.000 - 1.139.999 Zeiss Opton Tessar shutter 1/500
2.8A Type 2 1951 1.154.000 - 1.163.999 Zeiss Opton Tessar 80/2.8 shutter 1/400
2.8A Type 2 1951 1.201.000 - 1.201.999 Zeiss Opton Tessar 80/2.8 shutter 1/500
2.8B 1952 1.204.000 - 1.259.999
2.8C 1952 1.260.000 - 1.457.405
2.8D 1955 1.600.000 - 1.620.100
2.8E 1956 1.621.000 - 1.664.999
2.8E2 1959 2.350.000 - 2.356.999 Zeiss Planar 80/2.8 or Schneider Xenotar 80/2.8
2.8E3 1962 2.360.000 - 2.362.024
2.8F 1960 2.400.000 - 2.451.850 Zeiss Planar 80/2.8 or Schneider Xenotar 80/2.8
2.8F2 1966 2.451.851 - 2.479.999 Zeiss Planar 80/2.8 or Schneider Xenotar 80/2.8
2.8F3 1969 2.600.000 - 2.799.999 Zeiss Planar 80/2.8 or Schneider Xenotar 80/2.8
2.8F4 1976 2.900.000 - 2.959.999
Aurum 1982 2.570.001 - 7.571.249
Aurum 1983 8.300.000 - 8.301.499
Platin 1984 2.985.000 - 2.985.499
Platin A 1989 2.986.500 - 2.986.599
2.8GX 1987 2.985.500 - Rollei Planar HFT 80/2.8
2.8GX 1993 8.810.000 - Rollei Planar HFT 80/2.8
2.8GX Edition 1989 5.010.000 - 5.017.999
Helmut Newton
1992 6.030.000 - 8.036.999
2.8 Royal

Omega Seamaster Professional

The Omega Seamaster Professional (SMP) is my first "luxury" mechnical watch. The SMP comes in many variations with different styles and size. Mine is a mid-size, silver bezel, skeleton hands, blue dial "James Bond" version.

The movement inside is an Omega cal. 1120, which is based on the well-known and trusted ETA 2892-A2. Omega performed heavy modification on the movement. Number of jewels increased from 21 to 23. The rotor is heavy and engraved. Movement surfaces are plated with rhodium and nicely finished. The movement is also COSC certified and adjusted for 5 positions and temperature. The watch has 44 hours power reserve.

This stainless steel watch is rated with 300 meter water resistance. The screw-down crown has an Omega logo on it. Notice that there is an extra crown at the 10 o'clock position. That is the Helium escape valve. It helps to release the helium gas accumulated inside the watch during deep sea diving.


A peek of inside

Sunday, November 20, 2005

穩壓加 slow turn-on 分享

A few days ago I posted an article on a headphone forum about voltage regulator with slow turn-on. I built it for my PIMETA headphone amplifier.

小弟之前做的 A47 用了 LM317 做穩壓, 效果不錯, 小巧之餘又穩定. 所以快將完成的 PIMETA 也想再用 LM317, 但今次想加入 slow turn-on, 希望可改善開機時有 "pop" 一聲的問題. 設計(又)係抄 LM317本身的 datasheet 及 Tangentsoft 上 的TREAD:

輸出電壓是由 R1 及 R2 決定: Vout = 1.25 * (1 + (R2 + VR) / R1), 其中 VR 用上 500 ohm 的可變電阻用作微調. R3 決定 slow turn-on 的時間長短.

剛剛在 breadboard 上作測試. R1 = 120 ohm, R2 = 1.5K ohm, R3 = 10K ohm. Vout 用可變電阻定在 18V. Vin 大約是 23V. 通電後電壓緩緩上升. 大約要 5 秒才升至 18V. 假如 R3 換上 50K ohm 的話, 大概要 15 秒才到 18V.

A few days later when I actually built it, i replaced some parts:

作了小小改動, 用 2n4403/2n2905 代替 2n3906. 昨晚由 breadboard 焊上板... 第一次焊完時唔 work... 後來發覺原本在 breadboard 上 ok 的 2n4403 燒左!! 今天在屋企附近買唔到 2n4403, 改買了 spec 上差不多的 2n2905 來試試... 2n2905 是鐵殼 (motorola 來的... $6粒), 唔知係咪好 d :p

左邊的是穩壓加 slow turn-on, 右邊是小弟之前做的純穩壓... size 一樣同一粒 9v 電差不多

不過, 用在 amp + 32 ohm headphone 上好像開機的 "pop" 聲冇什麼改善. 開始懷疑 pop 聲係由 amp 本身的 dc offset 做成 (~ 1mV).

pop 聲改善唔到, 不過寄望 slow turn-on 會令其它零件長命 d 吧

Mobile Phone Antenna (Feb 2005)

Recently there are some sort of construction works going on near my office building. As the new structure goes taller, the reception of my mobile phone becomes weaker. In the past week my phone can barely pick up any signal at all. So time to find a solution. Luckly my Motorola E398 has a socket for external antenna. So I decided to give it a try. After googling the Internet, it seems that Motorola is not selling any 'official' antenna. And the third parties ones are not cheap either. So I decided to make one myself.

The Antenna

The antenna itself is not hard to get. I managed to find one that is good for the 900MHz range. Too bad that it does not support 1800MHz as my phone is dual-band.


Finding a way to connect the antenna to my phone is a little bit tricky. Needless to say, I cannot find any connector that can bridge my phone and the SMA connector on the antenna.

Anyway, the connector on the antenna seems to be a male SMA connector. So I went to buy a female SMA connector and soldered a pin (ripped from a SMB connector) on the other end. The pin can be inserted to the socket on my phone. The combination works, just that the pin connection to the phone is not secure engouh, though. Need to find a better way later.


Testing the antenna with my Motorola E398 at my home seems to prove that the setup does work. The signal strength jumps from 2 to full when the antenna is connected.

To measure the real signal strength, I used the antenna with my old Nokia 6150 (which is hacked with the NetMonitor function.) The followings are noted:

  • RX to the current cell (channel 1) has boosted from -73dBm to -63dBm with antenna connected

  • The antenna supports 900MHz only. Without antenna, the second cell is the 1800MHz PCS channel 580. (For GSM 900, channel nubmers are 1-124. For GSM 1800, channel numbers are 512-885.) When antenna is connected, all the top three cells are 900MHz.


Price (HKD) Price (USD)
Antenna $55 $7.05
SMA (F) square panel $20 $2.56
SMB (F) $18 $2.31
Total: $93 $11.92

Yashica TLR (Nov 2003)

Yashica TLR. Japanese made. Classic copy of Rolleiflex/Rolleicord style. Some said the Yashinon lens is on par with the Tessar/Xenar found on Rollei. And of course I have to test it out. Here I have three Yashicas: 2 Yashica Mat and 1 Yashica D. Fitted with differnt lenses: Yashikor, Lumaxar, and Yashinon.

Yashica TLR models

Details of some Yashica TLR models.

Model Year Description
Yashica A 1958-1969 3-element Yashikor. B, 1/25 ~ 1/300. Red-window film advance
Yashica B
Yashica C 1957-1958
Yashica D 1957-1973 Early production with Yashikor. Later switched to the better 4-element Yashinon. B, 1 ~ 1/500.
Film advance knob. Shutter cocked separately.
Yashica E 1964-1966
Yashica 24 1966-1968
Yashica 12 1967-1968
Yashica Mat 1957-1971
Yashica 124 1968-1971
Yashica 124G 1970-1986

There are also other models such as Yashica LM, Yashica Mat EM, Yashica Mat LM etc. Currently the 124G model is the hottest Yashica TLR on auction sites. But, I think the build quality of the 124G is not as good as the old models. As long as the lens used is Yashinon, the Yashica D, Yashica Mat, and Yashica 124 etc models are priced more reasonable. Try to avoid models before Yashica D, though.


These are the most commonly found lenses on Yashica TLRs.

Tri-Lausar & Yashimar

3-element design. I haven't tried these lenses. But from what I heard, these lenses are not as sharp as the Yashikor.


Also a 3-element deisgn. Coated. Give good result when stopped down.


If you want to get serious with your TLR, this is the lens to look for. Copy of the famous Zeiss Tessar design. 4 elements in 3 groups. Coated


Lumaxar was the original name of Yashinon. The design is the same. So you can expect it gives the same quality as the Yashinon.


Shutter speed and aperture are set by the two wheels between the viewing lens and taking lens. The aperture settings are stepless, meaning that there are no click stops and you can set any aperture value you want. Both settings can be read easily by the windows on top of the viewing lens.

The models I have came with X and M sync. Some models only with X sync.

Early models use knobs for film advance. Shutter need to be cocked separately. Later models use levers and the shutter is cocked automatically during film advance.

More Photos

RC4 encryption in Java (April 2003)

What is RC4?

RC4 is a stream cipher with symmetric keys. It was originally designed by Rivest for RSA Data Security (now RSA Security). On September 9, 1994, the RC4 algorithm was anonymously posted on the Internet on the Cyperpunks "anonymous remailers" list.

Why implementing it?

I implemented it for doing encryption in some of my small Java projects.

In Java, the "official" way to do encryption is to use the Java Cryptography Extension (JCE). JCE is available as a separate package for JDK 1.2 and 1.3. It is now integrated into JDK 1.4. However, JCE is too heavy for some of my projects. All I need is a simple class that can do RC4 encryption and decryption, without complicated key generation and agreement etc.

However, if you need encryption for a "real" application, I strongly recommend you to use JCE. Also, Cryptix is a free implementation of JCE that worth a try.


You can download my implementation of RC4 here. The package also includes a testing class for comparing result and speed between my implementation and Cryptix.

You can freely use the code and class for private and non-commercial purposes.

The Javadoc is available here.


The RC4 algorithm is actually quite simple. So I implemented it in a single class.

To do encryption or decryption, you need to create an instance of the RC4 class with the key first. Usually, key length is between 1 to 2048 bits. But my implementation doesn't check that.

String key = "12345";
RC4 rc4 = new RC4(key);

To do encryption/decryption, just pass the plain text/cipher text to the rc4 method:

byte[] result = rc4.rc4(data);


On my Duron 856 (107 * 8) with JDK 1.4.1_01 HotSpot Server VM, my implementation can perform at around 15.6MB/s.

With JDK 1.3.1_02 HotSpot Server VM, the speed is around 13MB/s.


I also include a Test class in the package. It is for testing and benchmarking only and is not required for RC4 encryption. The test compares the encryption result of random data and key between Cryptix's and my implementation.

To run the test, you need to have Cryptix installed and configured. For using Cryptix under JDK 1.4, remember to install the "Unlimited Strength" Jurisdiction Policy Files