sphlib provides optimized implementations in both C and Java of cryptographic hash functions. The C code includes "small footprint" variants optimized for architectures with low L1 cache (e.g. WiFi routers running OpenWRT). The C code comes with a command-line tool that can serve as a drop-in replacement for md5sum, sha1sum, sha256sum, etc. for all implemented hash functions. The Java code is compatible with J2ME. There are implementations of fourteen "second-round" SHA-3 candidates, for all output lengths: BLAKE, Blue Midnight Wish, CubeHash, ECHO, Fugue, Grøstl, Hamsi, JH, Keccak, Luffa, Shabal, SHAvite-3, SIMD, and Skein. Some pre-SHA-3 hash functions (including MD4, MD5, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, RIPEMD-160, and others) are also implemented.