Metadata-Version: 2.1
Name: whirlpool-py311
Version: 1
Summary: Whirlpool: Bindings for whirlpool hash reference implementation.
Home-page: https://github.com/oohlaf/python-whirlpool
Download-URL: https://github.com/oohlaf/python-whirlpool/archive/1.zip
Maintainer: str1hex
Maintainer-email: str2hex@mail.ru
License: Public Domain
Keywords: digest hashlib whirlpool
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: Public Domain
Classifier: Programming Language :: C
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Security :: Cryptography
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS.txt


# python-whirlpool

[![Travis CI Build Status](https://travis-ci.org/oohlaf/python-whirlpool.svg?branch=master)](https://travis-ci.org/oohlaf/python-whirlpool)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/pw35grm8ald8lg22/branch/master?svg=true)](https://ci.appveyor.com/project/oohlaf/python-whirlpool/branch/master)
[![License: Unlicense](https://img.shields.io/badge/license-Unlicense-blue.svg)](http://unlicense.org/)

The [Whirlpool] algorithm is designed by Vincent Rijmen and Paulo S.L.M. Barreto.
It is a secure and modern digest function that has been recommended by the
[NESSIE] project and adopted in the ISO/IEC 10118-3 international standard.

Digest functions, also known as hash functions, produce fixed-length output (a
digest or hash) from a variable-length message. They are designed to be a
one-way function.

This library is a Python wrapper around the Whirlpool C reference implementation.
The Whirlpool reference implementations are public domain, as is this code.

The first version of the wrapper was written by James Cleveland with help
from #python on irc.freenode.net.

Later on the wrapper was rewritten by Olaf Conradi to use the hashlib interface
and he made the library compatible with Python 3.

## Installation

This library is available on [PyPI].

    pip install whirlpool

## Usage

This is the same interface as provided by the other digest algorithms in
Python's hashlib.
    
    import whirlpool

    wp = whirlpool.new("My String")
    hashed_string = wp.hexdigest()

    wp.update("My Salt")
    hashed_string = wp.hexdigest()

Starting with Python 3 text strings (as shown above) are stored as unicode.
You need to specify the encoding of these strings before hashing.

    wp = whirlpool.new(data.encoding('utf-8'))

Strings that are marked as binary do not need encoding.

## Development

The source code is available on [GitHub].

    git clone https://github.com/oohlaf/python-whirlpool.git
    cd python-whirlpool

Install in development mode using:

    python setup.py develop

Or install in editable mode using pip:

    pip install -e .

## Testing

This module is tested using Python 2.7, PyPy, and Python 3.3 and up.

You can run the test suite using

    python setup.py test

[Whirlpool]: https://en.wikipedia.org/wiki/Whirlpool_(cryptography)
[NESSIE]: https://www.cosic.esat.kuleuven.be/nessie/
[PyPI]: https://pypi.python.org/pypi/Whirlpool
[GitHub]: https://github.com/oohlaf/python-whirlpool


# Whirlpool Changelog

All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog][keepachangelog] and this
project adheres to [Semantic Versioning][semver].

## [Unreleased]

## [1.0.0] (2018-02-19)

### Added

- Port to Python 3.
- Added PyPy support. PyPy3 does not work due to functions
  that have not yet been ported (like missing `PyUnicode_New`).
- Added Continuous Integration using Travis CI and AppVeyor.
- Added automatic upload to PyPI for successful build tags. Proper
  vX.Y.Z style tags upload to production PyPI, any other build
  (including .devX appended) upload to Test PyPI.

### Fixed

- Fix struct function declaration prototype warnings.
- Fix pointer warnings.

### Changed

- Package ownership transferred to Olaf Conradi.
- Started using [Semantic Versioning][semver] together with
  [Keep a Changelog][keepachangelog].
- Restructured the package setup and revamped build scripts.

### Deprecated

- Removed the old deprecated `hash()` interface.

## [0.3] (2013-01-23)

### Added

- Added the same interface as other Python digest algorithms have
  (like the default `hashlib` module).

### Changed

- Created proper unit tests.

### Deprecated

- The `hash()` function is deprecated. Please transition to the hashlib
  interface and use `new()` and `hexdigest()`.

## 0.2 (unreleased)

- This release was skipped.

## 0.1 (2011-05-18)

### Added

- Initial commit by James Cleveland.

[Unreleased]: https://github.com/oohlaf/python-whirlpool/compare/v1.0.0...HEAD
[1.0.0]: https://github.com/oohlaf/python-whirlpool/compare/v0.3...v1.0.0
[0.3]: https://github.com/oohlaf/python-whirlpool/compare/v0.1...v0.3
[semver]: https://semver.org/spec/v2.0.0.html
[keepachangelog]: http://keepachangelog.com/en/1.0.0/
