| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -116,8 +116,10 @@ The :mod:`binascii` module defines the following functions: | |||
| 116 | 116 | ||
| 117 | 117 | .. function:: crc_hqx(data, value) | |
| 118 | 118 | ||
| 119 | - Compute the binhex4 crc value of *data*, starting with *value* as the | ||
| 120 | - initial crc, and return the result. | ||
| 119 | + Compute a 16-bit CRC value of *data*, starting with *value* as the | ||
| 120 | + initial CRC, and return the result. This uses the CRC-CCITT polynomial | ||
| 121 | + *x*:sup:`16` + *x*:sup:`12` + *x*:sup:`5` + 1, often represented as | ||
| 122 | + 0x1021. This CRC is used in the binhex4 format. | ||
| 121 | 123 | ||
| 122 | 124 | ||
| 123 | 125 | .. function:: crc32(data[, value]) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -900,12 +900,12 @@ binascii.crc_hqx -> unsigned_int | |||
| 900 | 900 | crc: unsigned_int(bitwise=True) | |
| 901 | 901 | / | |
| 902 | 902 | ||
| 903 | - Compute hqx CRC incrementally. | ||
| 903 | + Compute CRC-CCITT incrementally. | ||
| 904 | 904 | [clinic start generated code]*/ | |
| 905 | 905 | ||
| 906 | 906 | static unsigned int | |
| 907 | 907 | binascii_crc_hqx_impl(PyObject *module, Py_buffer *data, unsigned int crc) | |
| 908 | - /*[clinic end generated code: output=8ec2a78590d19170 input=add8c53712ccceda]*/ | ||
| 908 | + /*[clinic end generated code: output=8ec2a78590d19170 input=f18240ff8c705b79]*/ | ||
| 909 | 909 | { | |
| 910 | 910 | const unsigned char *bin_data; | |
| 911 | 911 | Py_ssize_t len; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -263,7 +263,7 @@ PyDoc_STRVAR(binascii_crc_hqx__doc__, | |||
| 263 | 263 | "crc_hqx($module, data, crc, /)\n" | |
| 264 | 264 | "--\n" | |
| 265 | 265 | "\n" | |
| 266 | - "Compute hqx CRC incrementally."); | ||
| 266 | + "Compute CRC-CCITT incrementally."); | ||
| 267 | 267 | ||
| 268 | 268 | #define BINASCII_CRC_HQX_METHODDEF \ | |
| 269 | 269 | {"crc_hqx", (PyCFunction)binascii_crc_hqx, METH_VARARGS, binascii_crc_hqx__doc__}, | |
@@ -550,4 +550,4 @@ binascii_b2a_qp(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *k | |||
| 550 | 550 | ||
| 551 | 551 | return return_value; | |
| 552 | 552 | } | |
| 553 | - /*[clinic end generated code: output=1f8d6e48f75f6d1e input=a9049054013a1b77]*/ | ||
| 553 | + /*[clinic end generated code: output=458eb09731cb7877 input=a9049054013a1b77]*/ | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments