This might be more of a computer science question than a mathematics one; I thought I'd start here but perhaps people might want to point me to a better forum, if this isn't the right one.
Informally, a one-way function is a function which can be computed quickly, but for which it's hard to compute the inverse quickly. As an example people usually talk about things like the function sending $n$ to $g^n$ modulo a large prime $p$, where $g$ is a generator of the group of units mod $p$. The idea is that solving the discrete log problem is computationally hard.
I'd like to have something a little stronger. I would like to have a function $f(a,T)$ of two variables $a$ and $T$, with the following properties:
*) The function $f(a,T)$ is publically known, and easy to compute given explicit values for $a$ and $T$.
*) If $T$ is fixed, knowledge of the pair $(a,f(a,T))$ for several values of $a$ does not permit you to be able to compute $T$ quickly.
Here is why I want such a function. I have written a simple Android game, and at any point in the game your score is $a$. My friend has an app which can edit internal data on any other app, so can change his score from $a$ to anything he likes, and thus cheat. I have temporarily defeated my friend though; I put a function $g$ into my code, and I keep track of both $a$ and $g(a)$. Whenever the score gets incremented, I increment $a$ and I also compute $b=g(a)$. During the game I constantly check that $b=g(a)$ and if it is ever not $g(a)$ then the game exits because it has been tampered with.
My friend will however soon figure out what $g(a)$ is (perhaps by plotting some values, perhaps by decompiling the code, perhaps by just looking through my source code) and anyway this all feels like security through obscurity, which is not ideal. Furthermore, if my friend plays legitimately and gets 5000 points they can then see what is in the g(a) register and note this down, and then get to 5000 points straight away the next time they play.
What I would like to do is to replace $g(a)$ by $f(a,T)$ with $T$ the time the game started (so $T$ is an extra element of randomness); the idea is that I build $f(a,T)$ after the game starts, so $T$ is not stored in memory in any reasonably-accessible way, and this should I think fox my friend.