A mapping $\al\colon S\to S$ is called a \emph{Cayley function} if
there exist an associative operation $\mu\colon S\times S\to S$ and an element $a\in S$ such that $\al(x)=\mu(a,x)$
for every $x\in S$. The aim of the paper is to give a characterization of Cayley functions in terms of their directed graphs.
This characterization is used to determine which elements of the centralizer of a permutation on a finite set
are Cayley functions. The paper ends with a number of problems.