title: How to print SealedObject encrypted data without file I/O?
body: <p>Below is my code.
  when I try to print sealed object it only displays </p>
  
  <blockquote>
    <p>"javax.crypto.SealedObject@34dac684"</p>
  </blockquote>
  
  <pre><code>private void encryptUserCodes(List&lt;UserCode&gt; userCodes) {
  
          try {
              // generate a secret key using the DES algorithm
              key = KeyGenerator.getInstance("DES").generateKey();
              ecipher = Cipher.getInstance("DES");
              dcipher = Cipher.getInstance("DES");
              // initialize the ciphers with the given key
              ecipher.init(Cipher.ENCRYPT_MODE, key);
              dcipher.init(Cipher.DECRYPT_MODE, key);
              // create a sealed object
              SealedObject sealed = new SealedObject((Serializable) userCodes, ecipher);
              //PRINT SEALED OBJECT HERE
          }
          catch(Exception e){
              e.printStackTrace();
          }
  }
  </code></pre>