The conversation function presented below is a greatly simplified version of OpenPAM's
<citerefentry><refentrytitle>openpam_ttyconv
</refentrytitle><manvolnum>3
</manvolnum></citerefentry>. It is fully functional, and should give the reader a good idea of how a conversation function should behave, but it is far too simple for real-world use. Even if you are not using OpenPAM, feel free to download the source code and adapt
<citerefentry><refentrytitle>openpam_ttyconv
</refentrytitle><manvolnum>3
</manvolnum></citerefentry> to your uses; we believe it to be as robust as a tty-oriented conversation function can reasonably get.