Alternative attachment link as a hash, immune to rename and move

Wheter i want to attach files to my vault (by having them inside or alongside the vault) it always become quite a mess, doesn’t detect duplicates, or adapt if i have a different file structure in two or more of my devices.

I would like to be able to link to files not just by folder name and file name, but (mostly for static files) by hash/digest. Such kind of hash links could even be resolved dynamically and even if the file has been moved, renamed or is situated on a whole different folder on a different device so long as i can tell obisian what are the roots that i place my documents in.

Having Obsidian index by hash all the content of the chosen root folders (recursively) would allow those “hash links” to be resolved very fast even if folders or location of file and folders varies from one machine to another machine, or if i decide to reorganise those folders without obsidian knowing because they are external folders, or if i have them on removable drive that doesn’t map to the same letter on different computers.

I have a few document directories for home and work and i don’t want to move them physically inside my vault, but even if i did any change in folders not done inside obsidian would break all the fragile links. I would also like to avoid duplicate all those in two locations, so i prefer if obsidian is equipped with a functionality to use a few locations as a root search folders and ability to use links more as if it was a search query with unique result, choose between unique path and name like now, or supply a hash.