[Python-modules-commits] [python-bcrypt] 05/15: change version to 3.0.0-1 New upstream release (Closes: #824952).

Daniel Stender stender at moszumanska.debian.org
Tue Jun 28 17:48:09 UTC 2016


This is an automated email from the git hooks/post-receive script.

stender pushed a commit to branch master
in repository python-bcrypt.

commit b66ba46bb8f2b7d6c921573e00c859c9852d2d5d
Merge: c63e9dd 2d23c21
Author: Daniel Stender <stender at debian.org>
Date:   Tue Jun 28 18:12:19 2016 +0200

    change version to 3.0.0-1
    New upstream release (Closes: #824952).

 MANIFEST.in                                        |   2 +-
 PKG-INFO                                           |  81 +-
 README.rst                                         |  73 +-
 debian/.git-dpm                                    |   6 +-
 debian/changelog                                   |   5 +-
 debian/patches/0001-import-tests-from-github.patch |   2 +-
 setup.cfg                                          |   4 +-
 setup.py                                           |  11 +-
 src/_csrc/bcrypt.c                                 | 274 +++++++
 src/_csrc/bcrypt_pbkdf.c                           | 168 ++++
 src/_csrc/blf.c                                    | 657 +++++++++++++++
 src/_csrc/blf.h                                    |  83 ++
 src/_csrc/portable_endian.h                        | 162 ++++
 src/_csrc/pycabcrypt.h                             |  28 +
 src/_csrc/sha2.c                                   | 812 ++++++++++++++++++
 src/_csrc/sha2.h                                   |  83 ++
 src/_csrc/timingsafe_bcmp.c                        |  29 +
 src/bcrypt.egg-info/PKG-INFO                       |  81 +-
 src/bcrypt.egg-info/SOURCES.txt                    |  28 +-
 src/bcrypt.egg-info/pbr.json                       |   1 -
 src/bcrypt/__about__.py                            |   8 +-
 src/bcrypt/__init__.py                             |  57 +-
 src/build_bcrypt.py                                |  30 +-
 src/crypt_blowfish-1.3/LINKS                       |  29 -
 src/crypt_blowfish-1.3/Makefile                    |  77 --
 src/crypt_blowfish-1.3/PERFORMANCE                 |  30 -
 src/crypt_blowfish-1.3/README                      |  68 --
 src/crypt_blowfish-1.3/crypt.3                     | 575 -------------
 src/crypt_blowfish-1.3/crypt.h                     |  24 -
 src/crypt_blowfish-1.3/crypt_blowfish.c            | 907 ---------------------
 src/crypt_blowfish-1.3/crypt_blowfish.h            |  27 -
 src/crypt_blowfish-1.3/crypt_gensalt.c             | 124 ---
 src/crypt_blowfish-1.3/crypt_gensalt.h             |  30 -
 src/crypt_blowfish-1.3/glibc-2.1.3-crypt.diff      |  53 --
 src/crypt_blowfish-1.3/glibc-2.14-crypt.diff       |  55 --
 src/crypt_blowfish-1.3/glibc-2.3.6-crypt.diff      |  52 --
 src/crypt_blowfish-1.3/ow-crypt.h                  |  43 -
 src/crypt_blowfish-1.3/wrapper.c                   | 551 -------------
 src/crypt_blowfish-1.3/x86.S                       | 203 -----
 39 files changed, 2605 insertions(+), 2928 deletions(-)

diff --cc debian/.git-dpm
index fa6606f,0000000..1ff22d9
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
 +# see git-dpm(1) from git-dpm package
- a4c82f96721dcf9ed1212f608750b9cd9c7cedb4
- a4c82f96721dcf9ed1212f608750b9cd9c7cedb4
- f0c87673943ca9ae04935bbe74d759199263c98e
++2d23c2153fa377d32c903a3167f1ae7f528634f1
++2d23c2153fa377d32c903a3167f1ae7f528634f1
++0f2834d39ceca322763c9618acdbcc813b774b0c
 +0f2834d39ceca322763c9618acdbcc813b774b0c
 +python-bcrypt_3.0.0.orig.tar.xz
 +64f6f4433f41881cbc177ccf9187378dd3d02665
 +27420
 +debianTag="debian/%e%v"
 +patchedTag="patched/%e%v"
 +upstreamTag="upstream/%e%u"
diff --cc debian/changelog
index 3e8a0e0,0000000..05daa16
mode 100644,000000..100644
--- a/debian/changelog
+++ b/debian/changelog
@@@ -1,81 -1,0 +1,82 @@@
- python-bcrypt (2.0.0-3) UNRELEASED; urgency=medium
++python-bcrypt (3.0.0-1) UNRELEASED; urgency=medium
 +
++  * New upstream release (Closes: #824952).
 +  * Added deb/source/options.
 +  * deb/upstream/signing-key.asc: updated (2048R/29F9ED98, Paul Kehrer).
 +
-  -- Daniel Stender <stender at debian.org>  Tue, 28 Jun 2016 18:08:05 +0200
++ -- Daniel Stender <stender at debian.org>  Tue, 28 Jun 2016 18:12:20 +0200
 +
 +python-bcrypt (2.0.0-2) unstable; urgency=medium
 +
 +  * Added import-tests-from-github.patch.
 +  * deb/control: added python3-six to build-deps.
 +  * deb/rules: removed test break failsafe from dh_auto_test override,
 +    added customized py.test call.
 +  * Added DEP-8 tests.
 +
 + -- Daniel Stender <debian at danielstender.com>  Sun, 10 Jan 2016 23:10:49 +0100
 +
 +python-bcrypt (2.0.0-1) unstable; urgency=medium
 +
 +  [ Daniel Stender ]
 +  * New upstream release (Closes: #803096).
 +  * Switched upstream from py-bcrypt to pyuca/bcrypt (Closes: #796853).
 +  * deb/control:
 +    + changed Priority from "extra" to "optional".
 +    + added Daniel Stender to Uploaders.
 +    + added dh-python and python{,3}-cffi and to build depends.
 +    + bumped Standards-Version to 3.9.6 (no changes needed).
 +    + updated Homepage.
 +    + added Vcs-Git and Vcs-Browser.
 +    + removed extended infos in long description text concerning py-bcrypt,
 +      made short description easier, updated URI of the mentioned paper.
 +  * deb/copyright:
 +    + updated.
 +    + added Daniel Stender to copyright holders of debian/.
 +  * deb/rules:
 +    + added exports for DH_VERBOSE and DEB_BUILD_OPTIONS=nocheck.
 +    + build with Pybuild.
 +    + use override for dh_installdocs to contribute into both packages.
 +  * deb/watch:
 +    + watch bcrypt on Pypi.
 +  * Added:
 +    + deb/.git-dpm (Repo initialzed for Git-dpm).
 +    + deb/upstream/signing-key.asc.
 +  * Dropped:
 +    + deb/manpage and deb/python-bcrypt.1 (belonging to py-bcrypt).
 +    + deb/docs (using dh_installdocs in deb/rules).
 +
 +  [ Raphaël Hertzog ]
 +  * Add build-dependencies on python{3,}-pytest and python-six that will be
 +    useful once we have actual tests in the tarball.
 +
 + -- Daniel Stender <debian at danielstender.com>  Fri, 08 Jan 2016 15:07:04 +0100
 +
 +python-bcrypt (0.4-2) unstable; urgency=medium
 +
 +  * Team upload.
 +  * Build-depend on python-all-dev and python3-all-dev, instead of just
 +    default python3?-dev. (Closes: #741770)
 +
 + -- Dimitri John Ledkov <xnox at ubuntu.com>  Mon, 31 Mar 2014 22:40:17 +0100
 +
 +python-bcrypt (0.4-1) unstable; urgency=low
 +
 +  * New Upstream release
 +  * Migrate to git-buildpackage
 +  * Update control file to reflect more modern debian standards (no changes)
 +  * Update to use debhelper 9
 +  * Add source/format of "3.0 (quilt)"
 +  * Fix spelling of parametrised throughout debian/ directory
 +  * Update watch file to use google code
 +  * Remove depricated pycompat file
 +  * Update copyright file to be machine-readable
 +
 + -- Simon Fondrie-Teitler <simonft at riseup.net>  Sat, 21 Sep 2013 16:26:21 -0500
 +
 +python-bcrypt (0.1-1) unstable; urgency=low
 +
 +  * Initial release (Closes: #454627)
 +  * Added man page.
 +
 + -- Kevin Coyner <kcoyner at debian.org>  Sat, 22 Dec 2007 13:45:05 -0500
diff --cc debian/patches/0001-import-tests-from-github.patch
index 8cd9fe1,0000000..4757cdf
mode 100644,000000..100644
--- a/debian/patches/0001-import-tests-from-github.patch
+++ b/debian/patches/0001-import-tests-from-github.patch
@@@ -1,298 -1,0 +1,298 @@@
- From a4c82f96721dcf9ed1212f608750b9cd9c7cedb4 Mon Sep 17 00:00:00 2001
++From 2d23c2153fa377d32c903a3167f1ae7f528634f1 Mon Sep 17 00:00:00 2001
 +From: Daniel Stender <debian at danielstender.com>
 +Date: Sat, 9 Jan 2016 12:23:35 +0100
 +Subject: import-tests-from-github
 +
 +Import tests which are currently missing in the Pypi tarball from the
 +Github repo.
 +Author: Daniel Stender <debian at danielstender.com>
 +Origin: https://github.com/pyca/bcrypt/blob/master/tests/test_bcrypt.py
 +Forwarded: https://github.com/pyca/bcrypt/issues/48
 +Last-Update: 2016-01-06
 +---
 + tests/test_bcrypt.py | 276 +++++++++++++++++++++++++++++++++++++++++++++++++++
 + 1 file changed, 276 insertions(+)
 + create mode 100644 tests/test_bcrypt.py
 +
 +diff --git a/tests/test_bcrypt.py b/tests/test_bcrypt.py
 +new file mode 100644
 +index 0000000..32fa15f
 +--- /dev/null
 ++++ b/tests/test_bcrypt.py
 +@@ -0,0 +1,276 @@
 ++import os
 ++
 ++import pytest
 ++
 ++import six
 ++
 ++import bcrypt
 ++
 ++
 ++def test_gensalt_basic(monkeypatch):
 ++    monkeypatch.setattr(os, "urandom", lambda n: b"0000000000000000")
 ++    assert bcrypt.gensalt() == b"$2b$12$KB.uKB.uKB.uKB.uKB.uK."
 ++
 ++
 ++ at pytest.mark.parametrize(("rounds", "expected"), [
 ++    (4, b"$2b$04$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (5, b"$2b$05$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (6, b"$2b$06$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (7, b"$2b$07$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (8, b"$2b$08$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (9, b"$2b$09$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (10, b"$2b$10$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (11, b"$2b$11$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (12, b"$2b$12$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (13, b"$2b$13$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (14, b"$2b$14$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (15, b"$2b$15$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (16, b"$2b$16$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (17, b"$2b$17$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (18, b"$2b$18$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (19, b"$2b$19$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (20, b"$2b$20$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (21, b"$2b$21$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (22, b"$2b$22$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (23, b"$2b$23$KB.uKB.uKB.uKB.uKB.uK."),
 ++    (24, b"$2b$24$KB.uKB.uKB.uKB.uKB.uK."),
 ++])
 ++def test_gensalt_rounds_valid(rounds, expected, monkeypatch):
 ++    monkeypatch.setattr(os, "urandom", lambda n: b"0000000000000000")
 ++    assert bcrypt.gensalt(rounds) == expected
 ++
 ++
 ++ at pytest.mark.parametrize("rounds", list(range(1, 4)))
 ++def test_gensalt_rounds_invalid(rounds, monkeypatch):
 ++    monkeypatch.setattr(os, "urandom", lambda n: b"0000000000000000")
 ++
 ++    with pytest.raises(ValueError):
 ++        bcrypt.gensalt(rounds)
 ++
 ++
 ++def test_gensalt_bad_prefix():
 ++    with pytest.raises(ValueError):
 ++        bcrypt.gensalt(prefix="bad")
 ++
 ++
 ++def test_gensalt_2a_prefix(monkeypatch):
 ++    monkeypatch.setattr(os, "urandom", lambda n: b"0000000000000000")
 ++    assert bcrypt.gensalt(prefix=b"2a") == b"$2a$12$KB.uKB.uKB.uKB.uKB.uK."
 ++
 ++
 ++ at pytest.mark.parametrize(("password", "salt", "expected"), [
 ++    (
 ++        b"Kk4DQuMMfZL9o",
 ++        b"$2b$04$cVWp4XaNU8a4v1uMRum2SO",
 ++        b"$2b$04$cVWp4XaNU8a4v1uMRum2SO026BWLIoQMD/TXg5uZV.0P.uO8m3YEm",
 ++    ),
 ++    (
 ++        b"9IeRXmnGxMYbs",
 ++        b"$2b$04$pQ7gRO7e6wx/936oXhNjrO",
 ++        b"$2b$04$pQ7gRO7e6wx/936oXhNjrOUNOHL1D0h1N2IDbJZYs.1ppzSof6SPy",
 ++    ),
 ++    (
 ++        b"xVQVbwa1S0M8r",
 ++        b"$2b$04$SQe9knOzepOVKoYXo9xTte",
 ++        b"$2b$04$SQe9knOzepOVKoYXo9xTteNYr6MBwVz4tpriJVe3PNgYufGIsgKcW",
 ++    ),
 ++    (
 ++        b"Zfgr26LWd22Za",
 ++        b"$2b$04$eH8zX.q5Q.j2hO1NkVYJQO",
 ++        b"$2b$04$eH8zX.q5Q.j2hO1NkVYJQOM6KxntS/ow3.YzVmFrE4t//CoF4fvne",
 ++    ),
 ++    (
 ++        b"Tg4daC27epFBE",
 ++        b"$2b$04$ahiTdwRXpUG2JLRcIznxc.",
 ++        b"$2b$04$ahiTdwRXpUG2JLRcIznxc.s1.ydaPGD372bsGs8NqyYjLY1inG5n2",
 ++    ),
 ++    (
 ++        b"xhQPMmwh5ALzW",
 ++        b"$2b$04$nQn78dV0hGHf5wUBe0zOFu",
 ++        b"$2b$04$nQn78dV0hGHf5wUBe0zOFu8n07ZbWWOKoGasZKRspZxtt.vBRNMIy",
 ++    ),
 ++    (
 ++        b"59je8h5Gj71tg",
 ++        b"$2b$04$cvXudZ5ugTg95W.rOjMITu",
 ++        b"$2b$04$cvXudZ5ugTg95W.rOjMITuM1jC0piCl3zF5cmGhzCibHZrNHkmckG",
 ++    ),
 ++    (
 ++        b"wT4fHJa2N9WSW",
 ++        b"$2b$04$YYjtiq4Uh88yUsExO0RNTu",
 ++        b"$2b$04$YYjtiq4Uh88yUsExO0RNTuEJ.tZlsONac16A8OcLHleWFjVawfGvO",
 ++    ),
 ++    (
 ++        b"uSgFRnQdOgm4S",
 ++        b"$2b$04$WLTjgY/pZSyqX/fbMbJzf.",
 ++        b"$2b$04$WLTjgY/pZSyqX/fbMbJzf.qxCeTMQOzgL.CimRjMHtMxd/VGKojMu",
 ++    ),
 ++    (
 ++        b"tEPtJZXur16Vg",
 ++        b"$2b$04$2moPs/x/wnCfeQ5pCheMcu",
 ++        b"$2b$04$2moPs/x/wnCfeQ5pCheMcuSJQ/KYjOZG780UjA/SiR.KsYWNrC7SG",
 ++    ),
 ++    (
 ++        b"vvho8C6nlVf9K",
 ++        b"$2b$04$HrEYC/AQ2HS77G78cQDZQ.",
 ++        b"$2b$04$HrEYC/AQ2HS77G78cQDZQ.r44WGcruKw03KHlnp71yVQEwpsi3xl2",
 ++    ),
 ++    (
 ++        b"5auCCY9by0Ruf",
 ++        b"$2b$04$vVYgSTfB8KVbmhbZE/k3R.",
 ++        b"$2b$04$vVYgSTfB8KVbmhbZE/k3R.ux9A0lJUM4CZwCkHI9fifke2.rTF7MG",
 ++    ),
 ++    (
 ++        b"GtTkR6qn2QOZW",
 ++        b"$2b$04$JfoNrR8.doieoI8..F.C1O",
 ++        b"$2b$04$JfoNrR8.doieoI8..F.C1OQgwE3uTeuardy6lw0AjALUzOARoyf2m",
 ++    ),
 ++    (
 ++        b"zKo8vdFSnjX0f",
 ++        b"$2b$04$HP3I0PUs7KBEzMBNFw7o3O",
 ++        b"$2b$04$HP3I0PUs7KBEzMBNFw7o3O7f/uxaZU7aaDot1quHMgB2yrwBXsgyy",
 ++    ),
 ++    (
 ++        b"I9VfYlacJiwiK",
 ++        b"$2b$04$xnFVhJsTzsFBTeP3PpgbMe",
 ++        b"$2b$04$xnFVhJsTzsFBTeP3PpgbMeMREb6rdKV9faW54Sx.yg9plf4jY8qT6",
 ++    ),
 ++    (
 ++        b"VFPO7YXnHQbQO",
 ++        b"$2b$04$WQp9.igoLqVr6Qk70mz6xu",
 ++        b"$2b$04$WQp9.igoLqVr6Qk70mz6xuRxE0RttVXXdukpR9N54x17ecad34ZF6",
 ++    ),
 ++    (
 ++        b"VDx5BdxfxstYk",
 ++        b"$2b$04$xgZtlonpAHSU/njOCdKztO",
 ++        b"$2b$04$xgZtlonpAHSU/njOCdKztOPuPFzCNVpB4LGicO4/OGgHv.uKHkwsS",
 ++    ),
 ++    (
 ++        b"dEe6XfVGrrfSH",
 ++        b"$2b$04$2Siw3Nv3Q/gTOIPetAyPr.",
 ++        b"$2b$04$2Siw3Nv3Q/gTOIPetAyPr.GNj3aO0lb1E5E9UumYGKjP9BYqlNWJe",
 ++    ),
 ++    (
 ++        b"cTT0EAFdwJiLn",
 ++        b"$2b$04$7/Qj7Kd8BcSahPO4khB8me",
 ++        b"$2b$04$7/Qj7Kd8BcSahPO4khB8me4ssDJCW3r4OGYqPF87jxtrSyPj5cS5m",
 ++    ),
 ++    (
 ++        b"J8eHUDuxBB520",
 ++        b"$2b$04$VvlCUKbTMjaxaYJ.k5juoe",
 ++        b"$2b$04$VvlCUKbTMjaxaYJ.k5juoecpG/7IzcH1AkmqKi.lIZMVIOLClWAk.",
 ++    ),
 ++])
 ++def test_hashpw_new(password, salt, expected):
 ++    assert bcrypt.hashpw(password, salt) == expected
 ++
 ++
 ++ at pytest.mark.parametrize(("password", "hashed"), [
 ++    (
 ++        b"Kk4DQuMMfZL9o",
 ++        b"$2b$04$cVWp4XaNU8a4v1uMRum2SO026BWLIoQMD/TXg5uZV.0P.uO8m3YEm",
 ++    ),
 ++    (
 ++        b"9IeRXmnGxMYbs",
 ++        b"$2b$04$pQ7gRO7e6wx/936oXhNjrOUNOHL1D0h1N2IDbJZYs.1ppzSof6SPy",
 ++    ),
 ++    (
 ++        b"xVQVbwa1S0M8r",
 ++        b"$2b$04$SQe9knOzepOVKoYXo9xTteNYr6MBwVz4tpriJVe3PNgYufGIsgKcW",
 ++    ),
 ++    (
 ++        b"Zfgr26LWd22Za",
 ++        b"$2b$04$eH8zX.q5Q.j2hO1NkVYJQOM6KxntS/ow3.YzVmFrE4t//CoF4fvne",
 ++    ),
 ++    (
 ++        b"Tg4daC27epFBE",
 ++        b"$2b$04$ahiTdwRXpUG2JLRcIznxc.s1.ydaPGD372bsGs8NqyYjLY1inG5n2",
 ++    ),
 ++    (
 ++        b"xhQPMmwh5ALzW",
 ++        b"$2b$04$nQn78dV0hGHf5wUBe0zOFu8n07ZbWWOKoGasZKRspZxtt.vBRNMIy",
 ++    ),
 ++    (
 ++        b"59je8h5Gj71tg",
 ++        b"$2b$04$cvXudZ5ugTg95W.rOjMITuM1jC0piCl3zF5cmGhzCibHZrNHkmckG",
 ++    ),
 ++    (
 ++        b"wT4fHJa2N9WSW",
 ++        b"$2b$04$YYjtiq4Uh88yUsExO0RNTuEJ.tZlsONac16A8OcLHleWFjVawfGvO",
 ++    ),
 ++    (
 ++        b"uSgFRnQdOgm4S",
 ++        b"$2b$04$WLTjgY/pZSyqX/fbMbJzf.qxCeTMQOzgL.CimRjMHtMxd/VGKojMu",
 ++    ),
 ++    (
 ++        b"tEPtJZXur16Vg",
 ++        b"$2b$04$2moPs/x/wnCfeQ5pCheMcuSJQ/KYjOZG780UjA/SiR.KsYWNrC7SG",
 ++    ),
 ++    (
 ++        b"vvho8C6nlVf9K",
 ++        b"$2b$04$HrEYC/AQ2HS77G78cQDZQ.r44WGcruKw03KHlnp71yVQEwpsi3xl2",
 ++    ),
 ++    (
 ++        b"5auCCY9by0Ruf",
 ++        b"$2b$04$vVYgSTfB8KVbmhbZE/k3R.ux9A0lJUM4CZwCkHI9fifke2.rTF7MG",
 ++    ),
 ++    (
 ++        b"GtTkR6qn2QOZW",
 ++        b"$2b$04$JfoNrR8.doieoI8..F.C1OQgwE3uTeuardy6lw0AjALUzOARoyf2m",
 ++    ),
 ++    (
 ++        b"zKo8vdFSnjX0f",
 ++        b"$2b$04$HP3I0PUs7KBEzMBNFw7o3O7f/uxaZU7aaDot1quHMgB2yrwBXsgyy",
 ++    ),
 ++    (
 ++        b"I9VfYlacJiwiK",
 ++        b"$2b$04$xnFVhJsTzsFBTeP3PpgbMeMREb6rdKV9faW54Sx.yg9plf4jY8qT6",
 ++    ),
 ++    (
 ++        b"VFPO7YXnHQbQO",
 ++        b"$2b$04$WQp9.igoLqVr6Qk70mz6xuRxE0RttVXXdukpR9N54x17ecad34ZF6",
 ++    ),
 ++    (
 ++        b"VDx5BdxfxstYk",
 ++        b"$2b$04$xgZtlonpAHSU/njOCdKztOPuPFzCNVpB4LGicO4/OGgHv.uKHkwsS",
 ++    ),
 ++    (
 ++        b"dEe6XfVGrrfSH",
 ++        b"$2b$04$2Siw3Nv3Q/gTOIPetAyPr.GNj3aO0lb1E5E9UumYGKjP9BYqlNWJe",
 ++    ),
 ++    (
 ++        b"cTT0EAFdwJiLn",
 ++        b"$2b$04$7/Qj7Kd8BcSahPO4khB8me4ssDJCW3r4OGYqPF87jxtrSyPj5cS5m",
 ++    ),
 ++    (
 ++        b"J8eHUDuxBB520",
 ++        b"$2b$04$VvlCUKbTMjaxaYJ.k5juoecpG/7IzcH1AkmqKi.lIZMVIOLClWAk.",
 ++    ),
 ++])
 ++def test_hashpw_existing(password, hashed):
 ++    assert bcrypt.hashpw(password, hashed) == hashed
 ++
 ++
 ++def test_hashpw_invalid():
 ++    with pytest.raises(ValueError):
 ++        bcrypt.hashpw(b"password", b"$2z$04$cVWp4XaNU8a4v1uMRum2SO")
 ++
 ++
 ++def test_hashpw_str_password():
 ++    with pytest.raises(TypeError):
 ++        bcrypt.hashpw(
 ++            six.text_type("password"),
 ++            b"$2b$04$cVWp4XaNU8a4v1uMRum2SO",
 ++        )
 ++
 ++
 ++def test_hashpw_str_salt():
 ++    with pytest.raises(TypeError):
 ++        bcrypt.hashpw(
 ++            b"password",
 ++            six.text_type("$2b$04$cVWp4XaNU8a4v1uMRum2SO"),
 ++        )
 ++
 ++
 ++def test_nul_byte():
 ++    with pytest.raises(ValueError):
 ++        bcrypt.hashpw(b"abc\0def", bcrypt.gensalt(0))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-bcrypt.git



More information about the Python-modules-commits mailing list