Create conditions when encryption is enabled.