Open Kortanul opened 7 years ago
This was the missing step for me. It should definitely be included in the actual README
Small contribution to make things more obvious.
password = "<LOGIN PASSWORD WITH BACKSLASHED SPECIAL CHARACTERS>";
salt ="<SALT FROM STEP 1>";
Thanks.
if the user has chosen to use only one password, instead of having to enter the second password, then PM generates a password for the private key using a salt and the log-in password.
to get that password, a user needs to use something like https://github.com/dexice/pmpkpe to get that passphrase.
alternatively, if you don't trust that program, then you can use PM's own code to get it while in the browser. here's how:
saltBinary = pmcrypto.binaryStringToArray(pmcrypto.decode_base64(salt)); keySalt = dcodeIO.bcrypt.encodeBase64(saltBinary, 16); bcryptKey = dcodeIO.bcrypt.hashSync(password, '$2y$10$' + keySalt);
key = bcryptKey.slice(29); console.log(key);