Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
97384dfb
Commit
97384dfb
authored
8 years ago
by
lenkis
Browse files
Options
Downloads
Patches
Plain Diff
Fixes #1593: Fix digest.crc32 description
parent
4efffe45
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/sphinx/reference/digest.rst
+15
-3
15 additions, 3 deletions
doc/sphinx/reference/digest.rst
with
15 additions
and
3 deletions
doc/sphinx/reference/digest.rst
+
15
−
3
View file @
97384dfb
...
...
@@ -79,16 +79,28 @@ Returns array of random bytes with length = integer.
Returns 32-bit checksum made with CRC32.
The crc32 and crc32_update functions use the `CRC-32C (Castagnoli)`_ polynomial
value: 0x1
1
EDC6F41 / 4812730177. If it is necessary to be
value: 0x1EDC6F41 / 4812730177. If it is necessary to be
compatible with other checksum functions in other
programming languages, ensure that the other functions use
the same polynomial value. |br| For example, in Python,
install the crcmod package and say:
the same polynomial value.
For example, in Python, install the ``crcmod`` package and say:
>>> import crcmod
>>> fun = crcmod.mkCrcFun('4812730177')
>>> fun('string')
3304160206L
In Perl, install the ``Digest::CRC`` module and run the following code:
.. code-block:: perl
use Digest::CRC;
$d = Digest::CRC->new(width => 32, poly => 0x1EDC6F41, init => 0xFFFFFFFF, refin => 1, refout => 1);
$d->add('string');
print $d->digest;
(the expected output is 3304160206).
.. _CRC-32C (Castagnoli): https://en.wikipedia.org/wiki/Cyclic_redundancy_check#Standards_and_common_use
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment