Python Generate Password Hash