title: Promise returning as a function when wrapping callback function
body: <p>I'm trying to convert an existing callback based function from the crypto library to be used with es6 <code>async/await</code> in the method above it. Whenever I make a call to <code>generateSubkey(password,salt)</code> it returns <code>[function]</code>. Inside this if I call <code>toString()</code> it shows my methods code as opposed to executing it.</p>
  
  <pre><code>import crypto from 'crypto';
  import Promise from 'bluebird';
  
  async hashPassword(password) {
  
      try {
          // Create a salt with cryptographically secure method.
          let salt = await crypto.randomBytes(16);
  
          let subkey = await this.generateSubkey(password, salt);
  
          console.log(subkey);
  
      } catch (e) {
  
      }
  
  }
  
  generateSubkey(password, salt) {
      return new Promise.resolve((resolve, reject) =&gt; {
          return crypto.pbkdf2(password, salt, 10000, 32, 'sha256', (err, buffer) =&gt; {
              if (err) {
                  reject();
              }
              resolve(buffer);
          });
      })
  }
  </code></pre>