H
harryos
hi
i tried to use 192 bit encryption like below
Cipher c = Cipher.getInstance("Blowfish/ECB/NoPadding");
// create a 192 bit secret key from raw bytes
SecretKey key192 = new SecretKeySpec(
new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,0x10, 0x11, 0x12, 0x13,
0x14, 0x15, 0x16, 0x17 },"Blowfish");
//try encrypting with the 192bit key
c.init(Cipher.ENCRYPT_MODE, key192);
c.doFinal(data);
System.out.println("192 bit test: passed");
....
the above code gives an invalid keysize error..I live outside U.S..and
am using java 1.6.0_05-b13 .so i don't know if i can use larger keys
for encryption..I read about 'unrestricted policy files' in some java
book..Is there such a policy file ?I couldn't find any on sun java
site
any help wd be most welcome
thanks
harry
i tried to use 192 bit encryption like below
Cipher c = Cipher.getInstance("Blowfish/ECB/NoPadding");
// create a 192 bit secret key from raw bytes
SecretKey key192 = new SecretKeySpec(
new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,0x10, 0x11, 0x12, 0x13,
0x14, 0x15, 0x16, 0x17 },"Blowfish");
//try encrypting with the 192bit key
c.init(Cipher.ENCRYPT_MODE, key192);
c.doFinal(data);
System.out.println("192 bit test: passed");
....
the above code gives an invalid keysize error..I live outside U.S..and
am using java 1.6.0_05-b13 .so i don't know if i can use larger keys
for encryption..I read about 'unrestricted policy files' in some java
book..Is there such a policy file ?I couldn't find any on sun java
site
any help wd be most welcome
thanks
harry