Help required on Java Encryption

I am using following code on jdk131_08,JCE1.2.2getting following error

java.security.NoSuchAlgorithmException: Cannot find any provider supporting Blowfish

at javax.crypto.Cipher.getInstance(DashoA6275)

at CipherTest.encrypt(CipherTest.java:32)

at CipherTest.main(CipherTest.java:23)

Exception in thread "main"

import java.security.InvalidKeyException;

import java.security.NoSuchAlgorithmException;

import java.security.SecureRandom;

import javax.crypto.BadPaddingException;

import javax.crypto.Cipher;

import javax.crypto.IllegalBlockSizeException;

import javax.crypto.NoSuchPaddingException;

import javax.crypto.spec.SecretKeySpec;

publicclass CipherTest{

privatestaticfinalchar[] hexDigits ={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};

publicstatic String encryptionKey ="dmt";

publicstatic String encryptionType="Blowfish";

publicstaticvoid main(String[] args)throws InvalidKeyException, BadPaddingException, IllegalBlockSizeException, NoSuchAlgorithmException, NoSuchPaddingException, NoSuchMethodException

{

encrypt();

}

publicstaticvoid encrypt()throws NoSuchMethodException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException, NoSuchAlgorithmException, NoSuchPaddingException{

SecretKeySpec secretKey =new

SecretKeySpec(encryptionKey.getBytes(), encryptionType);

// KeyGenerator generator= KeyGenerator.getInstance("DES");

//generator.init(new SecureRandom());

Cipher cipher = Cipher.getInstance(encryptionType);

cipher.init(Cipher.ENCRYPT_MODE, secretKey,new SecureRandom());

String input ="Ramesh";

byte[] inputBytes = input.getBytes();

byte[] ciphered = cipher.doFinal(inputBytes);

System.out.println(byteToHex(ciphered));

}

publicstatic String byteToHex(byte[] b){

StringBuffer h =new StringBuffer();

for (int i = 0; i < b.length; i++){

int k = b[i];

h.append(hexDigits[(k >>> 4) & 0x0F]);

h.append(hexDigits[k & 0x0F]);

}

return h.toString();

}

}

[4400 byte] By [ramveea] at [2007-11-26 15:11:56]
# 1
This forum is about "generic types" not general questions about Java.Try http://forum.java.sun.com/category.jspa?categoryID=5 instead.
PeterAhea at 2007-7-8 9:03:01 > top of Java-index,Core,Core APIs...
# 2
you're on a mission lately, eh peter?!
georgemca at 2007-7-8 9:03:01 > top of Java-index,Core,Core APIs...
# 3

I notice that the Concurrency forum

http://forum.java.sun.com/forum.jspa?forumID=534

has a sticky post at the top linking to an FAQ. Would be nice if other forums (like this one) could have the same thing, don't you think? The occasional person might accidentally click on it and read it.

DrClapa at 2007-7-8 9:03:01 > top of Java-index,Core,Core APIs...