add get_deter, check if the key is valid even we just encrypt