final class: RC2Crypt
Implementation of the RC2(tm) algorithm as described in RFC 2268.
RC2 is a 16-bit based algorithm and not particularly fast on 32/64 bit
architectures. Also, note that although the JVM has a 16-bit integer
type (short), all expressions are evaluated either in 32 or 64 bit
(int or long). Expression such as "s1 = s2 + s3" are implemented by
first promoting s2 and s3 to int, performing an int addition, and
then demoting the result back to short to store in s1. To avoid this
fairly slow process, we use the int type throughout and manually insert
"& 0xffff" where necessary.
Andreas - Sterbenz
|Methods from java.lang.Object:|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait|