accept masterpwd file and a privatekey to generate password