try
{
// read the key, and decode from hex encoding
BufferedInputStream keystream =
new BufferedInputStream(new FileInputStream(keyfile));
int len = keystream.available();
byte[] keyhex = new byte[len];
keystream.read(keyhex, 0, len);
key = Hex.decode(keyhex);
}
catch (IOException ioe)