# Is there any kind of function that has a property like this?

First of all, sorry for any horrible formatting, I have to type this in from my phone.

I know (or, at least, I think) that no currently used cryptographically secure hash functions exist with this property, and I doubt it would make sense if they did, but I want to know if there is any kind of "hash"-like function that does.

Is there any function where if $x+y=z$, then $f^{-1}(f(x) + f(y))=z$? (Or some other operator: subtraction, AND, OR, etc, if that makes the question easier to answer) Other than something trivial like $f(x)=x$.

It would seem to me that such a function would likely be very susceptible to attack, although I do not know this for sure, but I do not plan on using it for anything that requires even a tiny amount of legit security.

Based on what I know about functions and algorithms, I would hazard a guess that such a function would need to be linear, but I don't know that for sure. I am looking for some sort of "hash"-like function to be able to store information (text, numbers, etc) in fixed sized pieces but still be able to do operations on them (adding, subtracting, etc) in that "hashed" state. Even if you only have some general information on where to look, that would be appreciated.