Characteristic function of the normal distribution
A simple change of variables allows you to compute $\mathbb{E}[e^{tX}]$ for real $t$ and standard normal $X$, $$ \begin{align} \mathbb{E}[e^{tX}]&=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty e^{-\frac12x^2}e^{tx}\,dx\\ &= \frac{e^{\frac12t^2}}{\sqrt{2\pi}}\int_{-\infty}^\infty e^{-\frac12(x-t)^2}\,dx\\ &=\frac{e^{\frac12t^2}}{\sqrt{2\pi}}\int_{-\infty}^\infty e^{-\frac12y^2}\,dy\\ &=e^{\frac12t^2}. \end{align} $$ Here, the substitution $y=x-t$ has been used. In fact, this identity holds for all complex $t$ as well by analytic continuation. The right hand side, $e^{\frac12t^2}$ is clearly analytic. The left hand side is analytic, as it has the derivative $\mathbb{E}[Xe^{tX}]$. The fact that you can commute differentiation and expectation follows from the dominated convergence theorem. Two analytic functions which agree on the real line must agree everywhere (by analytic continuation). So the identity holds for all complex $t$, and replacing $t$ by $it$ gives the expression you ask for.
In Fristedt and Gray's A Modern Approach to Probability, the authors sketch a proof. Use integration by parts and dominated convergence to show that $\beta(t)=\int f(x) e^{itx} dx$ satisfies the differential equation $\beta^\prime(t)=-t \beta(t)$ with $\beta(0)=1$. You have to justify manipulating integrals of $\mathbb{C}$-valued functions.