summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libmd5.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/lib/libmd5.tex')
-rw-r--r--Doc/lib/libmd5.tex14
1 files changed, 10 insertions, 4 deletions
diff --git a/Doc/lib/libmd5.tex b/Doc/lib/libmd5.tex
index edaa727..3e22820 100644
--- a/Doc/lib/libmd5.tex
+++ b/Doc/lib/libmd5.tex
@@ -15,8 +15,8 @@ example will be helpful:
to obtain the digest of the string \code{'abc'}, use \ldots
\bcode\begin{verbatim}
->>> from md5 import md5
->>> m = md5()
+>>> import md5
+>>> m = md5.new()
>>> m.update('abc')
>>> m.digest()
'\220\001P\230<\322O\260\326\226?}(\341\177r'
@@ -25,16 +25,22 @@ to obtain the digest of the string \code{'abc'}, use \ldots
More condensed:
\bcode\begin{verbatim}
->>> md5('abc').digest()
+>>> md5.new('abc').digest()
'\220\001P\230<\322O\260\326\226?}(\341\177r'
\end{verbatim}\ecode
\renewcommand{\indexsubitem}{(in module md5)}
-\begin{funcdesc}{md5}{\optional{arg}}
+
+\begin{funcdesc}{new}{\optional{arg}}
Create a new md5-object. If \var{arg} is present, an initial
\code{update} method is called with \var{arg} as argument.
\end{funcdesc}
+\begin{funcdesc}{md5}{\optional{arg}}
+For backward compatibility reasons, this is an alternative name for the
+\code{new} function.
+\end{funcdesc}
+
An md5-object has the following methods:
\renewcommand{\indexsubitem}{(md5 method)}