File: README.rst

package info (click to toggle)
siphashc 1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 108 kB
  • sloc: ansic: 209; python: 91; makefile: 2
file content (66 lines) | stat: -rw-r--r-- 1,551 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
siphashc
========

.. image:: https://travis-ci.org/WeblateOrg/siphashc.svg?branch=master
    :target: https://travis-ci.org/WeblateOrg/siphashc

.. image:: https://ci.appveyor.com/api/projects/status/kgeohtb6as3xd9b7/branch/master?svg=true
    :target: https://ci.appveyor.com/project/nijel/siphashc-merge/branch/master

.. image:: https://api.codacy.com/project/badge/Grade/33758f86fbf44e929d85f47390093771    
    :target: https://www.codacy.com/app/Weblate/siphashc

.. image:: https://img.shields.io/pypi/v/siphashc.svg
    :target: https://pypi.python.org/pypi/siphashc
    :alt: PyPI package

Installation
~~~~~~~~~~~~

Install using pip:

.. code-block:: sh

    pip install siphashc

Sources are available at <https://github.com/WeblateOrg/siphashc>.

Introduction
~~~~~~~~~~~~

siphashc is a python c-module for
`siphash <https://131002.net/siphash/>`__, based on `floodberry's
version <https://github.com/floodyberry/siphash>`__.

It was merged from two versions of the module:

-  https://github.com/cactus/siphashc
-  https://github.com/carlopires/siphashc3

Usage
~~~~~

Python 2
^^^^^^^^

.. code:: python

    >>> from siphashc import siphash
    >>> siphash('sixteencharstrng', 'i need a hash of this')
    10796923698683394048L

Python 3
^^^^^^^^

.. code:: python

    >>> from siphashc import siphash
    >>> siphash('sixteencharstrng', 'i need a hash of this')
    10796923698683394048

License
~~~~~~~

Released under the `MIT
license <http://www.opensource.org/licenses/mit-license.php>`__. See
``LICENSE.md`` file for details.