summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libbinascii.tex
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-02-16 21:13:37 (GMT)
committerGuido van Rossum <guido@python.org>2000-02-16 21:13:37 (GMT)
commit8006d316bcf10af9f3d22530ce88358370aec10b (patch)
tree2bfc1eb9cae7568ea3bd28966bf7ae64ae079400 /Doc/lib/libbinascii.tex
parentcba04366a47d77f3a63b3704651817a561154c32 (diff)
downloadcpython-8006d316bcf10af9f3d22530ce88358370aec10b.zip
cpython-8006d316bcf10af9f3d22530ce88358370aec10b.tar.gz
cpython-8006d316bcf10af9f3d22530ce88358370aec10b.tar.bz2
Added docs for new crc32() function. By Jim Ahlstrom.
(Fred, please check.)
Diffstat (limited to 'Doc/lib/libbinascii.tex')
-rw-r--r--Doc/lib/libbinascii.tex12
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/lib/libbinascii.tex b/Doc/lib/libbinascii.tex
index 470a7af..bbc7f44 100644
--- a/Doc/lib/libbinascii.tex
+++ b/Doc/lib/libbinascii.tex
@@ -71,6 +71,18 @@ length divisible by 3 (except possibly the last fragment).
Compute the binhex4 crc value of \var{data}, starting with an initial
\var{crc} and returning the result.
\end{funcdesc}
+
+\begin{funcdesc}{crc32}{data\optional{, crc}}
+Compute CRC-32, the 32-bit checksum of data, starting with an initial
+crc. This is consistent with the ZIP file checksum. Use as follows:
+\begin{verbatim}
+ print binascii.crc32("hello world")
+ # Or, in two pieces:
+ crc = binascii.crc32("hello")
+ crc = binascii.crc32(" world", crc)
+ print crc
+\end{verbatim}
+\end{funcdesc}
\begin{excdesc}{Error}
Exception raised on errors. These are usually programming errors.