Cipher cipher = Cipher.getInstance("Blowfish");
AlgorithmParameters params = cipher.getParameters();
System.out.println("Blowfish.params = "+params);
cipher.init(Cipher.ENCRYPT_MODE, key);
SealedObject msg = new SealedObject("This is a secret", cipher);
SecretKeySpec serverKey = new SecretKeySpec(kbytes, "Blowfish");
Cipher scipher = Cipher.getInstance("Blowfish");
scipher.init(Cipher.DECRYPT_MODE, serverKey);
String theMsg = (String) msg.getObject(scipher);
System.out.println("Decrypted: "+theMsg);
SecureRandom rnd = SecureRandom.getInstance("SHA1PRNG");
BigInteger bi = new BigInteger(320, rnd);
byte[] k2bytes = bi.toByteArray();