node.js - Creating an HMAC with an existing password hash and salt -
for migration reasons need take existing password & salt , place firebase. i'm uploading accounts firebase using google identity kit. kit allows me create users , requires sha-1 password salted.
var user1 = { localid: userid, email: email, salt: new buffer('salt-1'), passwordhash: crypto.createhmac('sha1', this.hashkey).update('a password' + 'salt-1').digest() };
above uploaded server. there way crypto.createhmac existing sha-1 hash , salt? i've tried replacing passwordhash , salt values, need encoded same way createhmac encodes them.
see hmac implementation.
the key hmac code is:
hash(o_key_pad ∥ hash(i_key_pad ∥ message))
so seems answer no since padded key needs concatenated message.
Comments
Post a Comment