title: is the sun.misc package still available in java?
body: <p>I would like to use the Base64 encoder of the package sun.misc.BASE64Encoder because I need to encode a password. However an error is being generated when I type in the import for this package.</p>
  
  <p>the message where the code for the encoder is to be used is the following:</p>
  
  <pre><code>private synchronized static String hash(final String username, final String password) {
          DIGEST.reset();
          return new BASE64Encoder().encode(DIGEST.digest((username.toLowerCase() + password).getBytes()));
      }
  </code></pre>
  
  <p>Is there an equivalent class in java which does the same thing? Or maybe, does someone know how to be able to get the code of the original class maybe please?</p>
  
  <p>thanks :)</p>