added checks for encryption key password