Memories are not held in their entirety in the brain like old movie clips, but are maintained as a kind of chemical residue of the original perception, which could be thought of as a hash value or remainder, but not a one-way algorithm at all.
FORBES: Density Of Meaning: Creation As The Flip Side Of Memory