I want to use cryptographic function that returns the initial input or something related to it like its hash, the function should work like Encrypting some data or its hash, then encrypt the output of the data, and encrypt it again another time, and the loop continue to specific number of iterations and finally it can produce the first input after iterating it, that is meaning in the end of the loop it will decrypt that original input.
Assuming that we can use any different keys or same key if required in encryption and the function can only go in one way it can't be reversible so i can't run this process from the back loop and finally it should return the first input or something related to its first input by checking the hash of it or something like that.
I just mean by reversible it can only go from data1 to data2 to data3 an so on.. until data(x-1) to datax then data1 again, I don't want it to be go also from back like data1 to datax to data(x-1) an so on until data2 to data1 again.