tarantool / tarantool/doc

[3pt] Describe new digest module function for xxHash32/64

Open
#2,092 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature reference server
Dominant language
CSS
Stars
15
Forks
49
Avg merge
1d 13h
Merged PRs (30d)
3

Description

Describe the new digest module function for xxHash32/64

Product: Tarantool
Since: 2.9.1
Audience/target: Tarantool users
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/digest/
SME: @olegrok
Peer reviewer: @

Details

-- Examples below demonstrate xxHash32.
-- xxHash64 has exactly the same interface

-- Calculate the 32-bits hash (default seed is 0).
digest.xxhash32(string[, seed])

-- Streaming
-- Start a new hash by initializing state with a seed.
-- If no value provided, 0 is used as default.
xxhash = digest.xxhash32.new([seed])
-- Also it's possible to specify seed manually. If no value
-- provided a value initially passed to "new" is used.
-- Here and below "seed" expected to be unsigned
-- number. Function returns nothing.
xxhash:clear([seed])
-- Feed the hash state by calling "update" as many times as
-- necessary. Function returns nothing.
xxhash:update('string')
-- Produce a hash value.
xxhash:result()

Definition of done

  • The new digest module function for xxHash32/64 is described.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the root digest documentation: https://www.tarantool.io/en/doc/latest/reference/reference_lua/digest/ and inspect the related commit f998ea39e96d93113823d92727a1faf9860c8ea6. Document the xxHash32 and xxHash64 one-shot and streaming interfaces, including seed behavior, and mark the issue done when both functions are described for Tarantool users.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.