Quoting Scott Dier (dieman+tclug at ringworld.org): > * Bob Tanner <tanner at real-time.com> [010710 02:08]: > > Doing -single- DES on a 140 byte array is taking an avg of 4 sec! > > I'm going to tell you right now. Use single DES for anything and you > rot in heck. > > I don't know why DES would be so HORRIBLY slow though. Do you have any > example code of what your doing in that part of your code? It might be > something your doing thats triggering something nasty to be done. > public byte[] tripleDES(String clearText) throws NoSuchAlgorithmException, InvalidKeyException, InvalidKeySpecException, IllegalBlockSizeException, InvalidKeyException, NoSuchPaddingException, BadPaddingException { SecretKeyFactory sf = SecretKeyFactory.getInstance("DESede"); SecretKey desKey = sf.generateSecret(new DESedeKeySpec(getSessionKey().getBytes())); Cipher desCipher = Cipher.getInstance("DESede/CBC/PKCS5Padding"); // Initialize the cipher for encryption desCipher.init(Cipher.ENCRYPT_MODE, desKey); // Our cleartext byte[] clearTextBytes = clearText.getBytes(); // Encrypt the cleartext byte[] cipherText = desCipher.doFinal(clearTextBytes); return cipherText; } -- Bob Tanner <tanner at real-time.com> | Phone : (952)943-8700 http://www.mn-linux.org | Fax : (952)943-8500 Key fingerprint = 6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9