The MD5 twystlet is a pure Java implementation of RFC 1321 originally created in a fit of pure masochism for the memory and performance constrained environment of a mobile phone. The code is conservatively optimized using:
- in-lined method calls and constants
- unrolled loops
- careful allocation of local variables
- byte-code 'tweaks'
The implementation includes 3 variants:
- A 'minimal' Java implementation that implements only the necessary functionality.
- A hand-optimized byte code implementation that offers the same performance as (2) in a slightly reduced footprint.
- A hand-optimised byte code implementation that offers the smallest footprint at the expense of reduced throughput.
- Full source for all implementations.
- Pre-built class files.
- JUnit validity tests.
- Japex performance test drivers.