Commit 3698bd26 authored by Martin Panter's avatar Martin Panter

Issue #29004: Document binascii.crc_hqx() implements CRC-CCITT

parent c0495753
...@@ -101,8 +101,10 @@ The :mod:`binascii` module defines the following functions: ...@@ -101,8 +101,10 @@ The :mod:`binascii` module defines the following functions:
.. function:: crc_hqx(data, crc) .. function:: crc_hqx(data, crc)
Compute the binhex4 crc value of *data*, starting with an initial *crc* and Compute a 16-bit CRC value of *data*, starting with an initial *crc* and
returning the result. returning the result. This uses the CRC-CCITT polynomial
*x*:sup:`16` + *x*:sup:`12` + *x*:sup:`5` + 1, often represented as
0x1021. This CRC is used in the binhex4 format.
.. function:: crc32(data[, crc]) .. function:: crc32(data[, crc])
......
...@@ -842,7 +842,7 @@ binascii_rledecode_hqx(PyObject *self, PyObject *args) ...@@ -842,7 +842,7 @@ binascii_rledecode_hqx(PyObject *self, PyObject *args)
} }
PyDoc_STRVAR(doc_crc_hqx, PyDoc_STRVAR(doc_crc_hqx,
"(data, oldcrc) -> newcrc. Compute hqx CRC incrementally"); "(data, oldcrc) -> newcrc. Compute CRC-CCITT incrementally");
static PyObject * static PyObject *
binascii_crc_hqx(PyObject *self, PyObject *args) binascii_crc_hqx(PyObject *self, PyObject *args)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment