Pages

Computing Hashes with Java

pitch

You need to quickly compute hashes from Strings (for example in order to safely store passwords into a database) ?

Well, just have a look a my project named hashutils

It simply provides one utiliy class that exposes simple methods to compute hashes from Strings using the following algorithms :

  • MD5
  • sha1
  • sha256
  • sha512

downlads

hashutils is hosted in our Maven2 repository.

You can download

  • the library itself
  • source code as a jar archive
  • javadoc as a jar archive

Simply head you way there and help yourself.

Eclipse, Linux and ‘PermGen space error’

You are working on a GNU/Linux system with at least a 2.6.16 Kernel and are tired of getting ‘PermGen Space’ errors with Eclipse, whatever value you choose for -Xms, -Xmx and -XX:MaxPermSize settings ?

An explanation could be that Eclipse fails to claim memory that is not really used by the system, but simply cached.

A solution is to flush cache before launching Eclipse by issuing the following command (as root) in a terminal :

sync; echo 3 > /proc/sys/vm/drop_caches

Hope it helps

Welcome

Let’s see where this goes …