\hypertarget{group__digest__algorithms}{}\doxysection{Crytographic Digest Algorithms}
\label{group__digest__algorithms}\index{Crytographic Digest Algorithms@{Crytographic Digest Algorithms}}


The following constants can be used with the \mbox{\hyperlink{group__hmac__functions_gaefc09e78e7bccccf7bc3629e4e86c9e2}{digest()}} and \mbox{\hyperlink{group__hmac__functions_gaf88021aec5a7048984b0a0e5ce21733d}{hmac()}} functions to calculate cryptographic digests and H\+M\+A\+Cs on input data.  


Collaboration diagram for Crytographic Digest Algorithms\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=325pt]{group__digest__algorithms}
\end{center}
\end{figure}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__digest__algorithms_ga84e4167bc334d99becf32a4c9297ef8b}\label{group__digest__algorithms_ga84e4167bc334d99becf32a4c9297ef8b}} 
const \mbox{\hyperlink{group__digest__algorithms_ga84e4167bc334d99becf32a4c9297ef8b}{Qore\+::\+C\+R\+Y\+P\+T\+O\+\_\+\+D\+I\+G\+E\+S\+T\+\_\+\+D\+SS}} = \char`\"{}dss\char`\"{}
\begin{DoxyCompactList}\small\item\em specifies the D\+SS message digest (based on S\+H\+A-\/0 and \href{http://en.wikipedia.org/wiki/Digital_Signature_Algorithm}{\texttt{ D\+SA}}) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__digest__algorithms_gad9807282c7a2d251c33ab3fa8e4cbcee}\label{group__digest__algorithms_gad9807282c7a2d251c33ab3fa8e4cbcee}} 
const \mbox{\hyperlink{group__digest__algorithms_gad9807282c7a2d251c33ab3fa8e4cbcee}{Qore\+::\+C\+R\+Y\+P\+T\+O\+\_\+\+D\+I\+G\+E\+S\+T\+\_\+\+D\+S\+S1}} = \char`\"{}dss1\char`\"{}
\begin{DoxyCompactList}\small\item\em specifies the D\+S\+S1 message digest (based on \href{http://en.wikipedia.org/wiki/SHA-1}{\texttt{ S\+H\+A1}} and \href{http://en.wikipedia.org/wiki/Digital_Signature_Algorithm}{\texttt{ D\+SA}}) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__digest__algorithms_ga5ae4457b5e78d3913a5f1c9c0c3db66c}\label{group__digest__algorithms_ga5ae4457b5e78d3913a5f1c9c0c3db66c}} 
const \mbox{\hyperlink{group__digest__algorithms_ga5ae4457b5e78d3913a5f1c9c0c3db66c}{Qore\+::\+C\+R\+Y\+P\+T\+O\+\_\+\+D\+I\+G\+E\+S\+T\+\_\+\+M\+D2}} = \char`\"{}md2\char`\"{}
\begin{DoxyCompactList}\small\item\em specifies the \href{http://en.wikipedia.org/wiki/MD2_(cryptography)}{\texttt{ M\+D2 message digest}} \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__digest__algorithms_gaa7373cfba42ce06748fea2455e63e70a}\label{group__digest__algorithms_gaa7373cfba42ce06748fea2455e63e70a}} 
const \mbox{\hyperlink{group__digest__algorithms_gaa7373cfba42ce06748fea2455e63e70a}{Qore\+::\+C\+R\+Y\+P\+T\+O\+\_\+\+D\+I\+G\+E\+S\+T\+\_\+\+M\+D4}} = \char`\"{}md4\char`\"{}
\begin{DoxyCompactList}\small\item\em specifies the \href{http://en.wikipedia.org/wiki/MD4}{\texttt{ M\+D4 message digest}} \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__digest__algorithms_gaf41b0d17486bbcc917ec447540cf8785}\label{group__digest__algorithms_gaf41b0d17486bbcc917ec447540cf8785}} 
const \mbox{\hyperlink{group__digest__algorithms_gaf41b0d17486bbcc917ec447540cf8785}{Qore\+::\+C\+R\+Y\+P\+T\+O\+\_\+\+D\+I\+G\+E\+S\+T\+\_\+\+M\+D5}} = \char`\"{}md5\char`\"{}
\begin{DoxyCompactList}\small\item\em specifies the \href{http://en.wikipedia.org/wiki/MD5}{\texttt{ M\+D5 message digest}} \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__digest__algorithms_ga96568e3ff1e16cf6fe1c924c3a5af70b}\label{group__digest__algorithms_ga96568e3ff1e16cf6fe1c924c3a5af70b}} 
const \mbox{\hyperlink{group__digest__algorithms_ga96568e3ff1e16cf6fe1c924c3a5af70b}{Qore\+::\+C\+R\+Y\+P\+T\+O\+\_\+\+D\+I\+G\+E\+S\+T\+\_\+\+M\+D\+C2}} = \char`\"{}mdc2\char`\"{}
\begin{DoxyCompactList}\small\item\em specifies the \href{http://en.wikipedia.org/wiki/MDC2}{\texttt{ M\+D\+C2 message digest}} \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__digest__algorithms_ga9658d092ce4ee79653f45292dc47964f}\label{group__digest__algorithms_ga9658d092ce4ee79653f45292dc47964f}} 
const \mbox{\hyperlink{group__digest__algorithms_ga9658d092ce4ee79653f45292dc47964f}{Qore\+::\+C\+R\+Y\+P\+T\+O\+\_\+\+D\+I\+G\+E\+S\+T\+\_\+\+R\+I\+P\+E\+M\+D160}} = \char`\"{}ripemd160\char`\"{}
\begin{DoxyCompactList}\small\item\em specifies the \href{http://en.wikipedia.org/wiki/RIPEMD}{\texttt{ R\+I\+P\+E\+MD message digest}} \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__digest__algorithms_gaf0156e70f3e7dc7edf5804ef32b455f4}\label{group__digest__algorithms_gaf0156e70f3e7dc7edf5804ef32b455f4}} 
const \mbox{\hyperlink{group__digest__algorithms_gaf0156e70f3e7dc7edf5804ef32b455f4}{Qore\+::\+C\+R\+Y\+P\+T\+O\+\_\+\+D\+I\+G\+E\+S\+T\+\_\+\+S\+HA}} = \char`\"{}sha\char`\"{}
\begin{DoxyCompactList}\small\item\em specifies the insecure and outdated S\+H\+A-\/0 message digest; only supplied for compatibility purposes \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__digest__algorithms_ga4860ea19cda90914fe06346d12db9564}\label{group__digest__algorithms_ga4860ea19cda90914fe06346d12db9564}} 
const \mbox{\hyperlink{group__digest__algorithms_ga4860ea19cda90914fe06346d12db9564}{Qore\+::\+C\+R\+Y\+P\+T\+O\+\_\+\+D\+I\+G\+E\+S\+T\+\_\+\+S\+H\+A1}} = \char`\"{}sha1\char`\"{}
\begin{DoxyCompactList}\small\item\em specifies the \href{http://en.wikipedia.org/wiki/SHA-1}{\texttt{ S\+H\+A1 message digest}} \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__digest__algorithms_ga1be49f7eeacfce675bc0551f89248789}\label{group__digest__algorithms_ga1be49f7eeacfce675bc0551f89248789}} 
const \mbox{\hyperlink{group__digest__algorithms_ga1be49f7eeacfce675bc0551f89248789}{Qore\+::\+C\+R\+Y\+P\+T\+O\+\_\+\+D\+I\+G\+E\+S\+T\+\_\+\+S\+H\+A224}} = \char`\"{}sha224\char`\"{}
\begin{DoxyCompactList}\small\item\em specifies the S\+H\+A-\/224 message digest (a variant of \href{http://en.wikipedia.org/wiki/SHA-2}{\texttt{ S\+H\+A-\/2}}) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__digest__algorithms_ga9b747da4eed94175c0844cc3a2cea4aa}\label{group__digest__algorithms_ga9b747da4eed94175c0844cc3a2cea4aa}} 
const \mbox{\hyperlink{group__digest__algorithms_ga9b747da4eed94175c0844cc3a2cea4aa}{Qore\+::\+C\+R\+Y\+P\+T\+O\+\_\+\+D\+I\+G\+E\+S\+T\+\_\+\+S\+H\+A256}} = \char`\"{}sha256\char`\"{}
\begin{DoxyCompactList}\small\item\em specifies the S\+H\+A-\/256 message digest (a variant of \href{http://en.wikipedia.org/wiki/SHA-2}{\texttt{ S\+H\+A-\/2}}) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__digest__algorithms_ga06fb50eb1917c154217dfa19f56cb258}\label{group__digest__algorithms_ga06fb50eb1917c154217dfa19f56cb258}} 
const \mbox{\hyperlink{group__digest__algorithms_ga06fb50eb1917c154217dfa19f56cb258}{Qore\+::\+C\+R\+Y\+P\+T\+O\+\_\+\+D\+I\+G\+E\+S\+T\+\_\+\+S\+H\+A384}} = \char`\"{}sha384\char`\"{}
\begin{DoxyCompactList}\small\item\em specifies the S\+H\+A-\/384 message digest (a variant of \href{http://en.wikipedia.org/wiki/SHA-2}{\texttt{ S\+H\+A-\/2}}) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__digest__algorithms_ga6ed1d1807fe333274bd5781f8f6923bc}\label{group__digest__algorithms_ga6ed1d1807fe333274bd5781f8f6923bc}} 
const \mbox{\hyperlink{group__digest__algorithms_ga6ed1d1807fe333274bd5781f8f6923bc}{Qore\+::\+C\+R\+Y\+P\+T\+O\+\_\+\+D\+I\+G\+E\+S\+T\+\_\+\+S\+H\+A512}} = \char`\"{}sha512\char`\"{}
\begin{DoxyCompactList}\small\item\em specifies the S\+H\+A-\/512 message digest (a variant of \href{http://en.wikipedia.org/wiki/SHA-2}{\texttt{ S\+H\+A-\/2}}) \end{DoxyCompactList}\item 
const \mbox{\hyperlink{group__digest__algorithms_ga08088b7c0d1162c80782a6dbd8fa05a7}{Qore\+::\+Digest\+Map}} = qore(init\+\_\+digest\+\_\+map\+\_\+hash())
\begin{DoxyCompactList}\small\item\em A hash keyed by supported digest name where each value is \mbox{\hyperlink{basic_data_types_True}{True}}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The following constants can be used with the \mbox{\hyperlink{group__hmac__functions_gaefc09e78e7bccccf7bc3629e4e86c9e2}{digest()}} and \mbox{\hyperlink{group__hmac__functions_gaf88021aec5a7048984b0a0e5ce21733d}{hmac()}} functions to calculate cryptographic digests and H\+M\+A\+Cs on input data. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{Qore::FileOutputStream of(\textcolor{stringliteral}{"my-\/file.txt"});}
\DoxyCodeLine{Qore::TransformOutputStream ts(of, \mbox{\hyperlink{group__hmac__functions_ga913932d6120f9ea1e3918168fb204976}{get\_decryptor}}(Qore::CRYPTO\_ALG\_BLOWFISH));}
\end{DoxyCode}

\end{DoxyParagraph}
These constants are useful in the following functions\+:
\begin{DoxyItemize}
\item \mbox{\hyperlink{group__hmac__functions_gaefc09e78e7bccccf7bc3629e4e86c9e2}{Qore\+::digest()}}
\item \mbox{\hyperlink{group__hmac__functions_gaf88021aec5a7048984b0a0e5ce21733d}{Qore\+::hmac()}}
\end{DoxyItemize}

\begin{DoxySince}{Since}
Qore 0.\+9.\+3 
\end{DoxySince}


\doxysubsection{Variable Documentation}
\mbox{\Hypertarget{group__digest__algorithms_ga08088b7c0d1162c80782a6dbd8fa05a7}\label{group__digest__algorithms_ga08088b7c0d1162c80782a6dbd8fa05a7}} 
\index{Crytographic Digest Algorithms@{Crytographic Digest Algorithms}!DigestMap@{DigestMap}}
\index{DigestMap@{DigestMap}!Crytographic Digest Algorithms@{Crytographic Digest Algorithms}}
\doxysubsubsection{\texorpdfstring{DigestMap}{DigestMap}}
{\footnotesize\ttfamily const Qore\+::\+Digest\+Map = qore(init\+\_\+digest\+\_\+map\+\_\+hash())}



A hash keyed by supported digest name where each value is \mbox{\hyperlink{basic_data_types_True}{True}}. 

\begin{DoxySince}{Since}
Qore 0.\+9.\+3 
\end{DoxySince}
