title: What is the algorithm name for PKCS#5 PBKDF1 in Java?
body: <p>I have a couple of questions in using cryptography. I am using AES.</p>
  
  <p><strong><em>Question 1:</em></strong></p>
  
  <p>I am trying to Use the <code>SecretKeyFactory</code> class in . I am trying to get instance related to PBKDF1 PKCS#5. I am new to cryptography. I tried online but Iam not able to find any such algorithm. Does  support it. I want some thing like this.</p>
  
  <pre><code>SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF1Pkcs#5");
  KeySpec spec = new PBEKeySpec(password, salt, 1, 128);
  </code></pre>
  
  <p><strong><em>Question 2:</em></strong></p>
  
  <p>Does the above two lines of code do the same thing as the below lines of code in Crypto++ code?</p>
  
  <pre><code>PKCS5_PBKDF1 &lt;MD5&gt; fn;
  fn.DeriveKey(key, MD5::DIGESTSIZE, 0, key.getBytes(), salt.getBytes(), salt.size(), PBKDF1_ITERATIONS, time_in_seconds);
  </code></pre>
  
  <p>If not can some one give some thing in  which can mimic what the above lines of c++ code do.</p>
  
  <p>Thanks</p>