IDataHashCursor cursor = pipeline.getHashCursor(); String algorithm = "DESede"; Key key = null; Cipher cipher = null; String encryptedData = null; byte[] encryptionBytes = null; String inputString =null;; try { if (cursor.first( "inputString" )) { inputString = (String) cursor.getValue(); } key = KeyGenerator.getInstance(algorithm).generateKey(); cipher = Cipher.getInstance(algorithm); cipher.init(Cipher.ENCRYPT_MODE, key); byte[] inputBytes = inputString.getBytes(); byte[] recoveredBytes = cipher.doFinal(inputBytes); encryptedData = new String(recoveredBytes); } catch (Exception ex) { throw new ServiceException(ex.toString()); } finally { cursor.insertAfter( "encryptedOutput", encryptedData.toString() ); cursor.destroy(); }