implemented password to key conversion