diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2018-09-08 11:29:00 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2018-09-08 11:29:00 -0700 |
commit | 13e96e7651857e0a9ceda6f02e37d488acb603da (patch) | |
tree | c10eafd25234c3a39b7666867223598060656332 | |
parent | 8d165b46dbcd63e2825b1e37deac946c5e219ee5 (diff) | |
download | zxcvbn-c-13e96e7651857e0a9ceda6f02e37d488acb603da.tar.gz |
git-debrebase convert-from-dgit-view: drop upstream changes from breakwater
Drop upstream changes, and delete debian/patches, as part of converting
to git-debrebase format. Upstream changes will appear as commits.
[git-debrebase convert-from-dgit-view drop-patches]
-rw-r--r-- | README.md | 29 | ||||
-rw-r--r-- | debian/patches/cross.patch | 21 | ||||
-rw-r--r-- | debian/patches/patch-README-for-Debian.patch | 58 | ||||
-rw-r--r-- | debian/patches/series | 2 | ||||
-rw-r--r-- | makefile | 3 |
5 files changed, 29 insertions, 84 deletions
@@ -11,15 +11,42 @@ The original coffee script version is available at An article on the reasons for zxcvbn is at https://tech.dropox.com/2012/04/zxcvbn-realistic-password-strength-estimation +##Building + +The makefile will build several test programs to test the code. It shows the steps needed +to use the code in C and C++ programs, using the dictionary data read from file or included +within the program executable. +The makefile has only been tried on Linux using GCC version 4.8.4, but should be faily +portable to other systems. + +When dictionary data is included in your program's executable, the files `zxcvbn.c` , +`zxcvbn.h` , `dict-src.h` are used in your program. + +When dictionary data is read from file, the files `zxcvbn.c` , `zxcvbn.h` , `dict-crc.h` +and `zxcvbn.dict` are used in your program, compiled with `#define USE_DICT_FILE`. The CRC +of the dictionary data file is written to `dict-crc.h` so your executable can detect +corruption of the data. + +Rename `zxcvbn.c` to `zxcvbn.cpp` (or whatever your compiler uses) to compile as C++. + +The `dict*.h` and `zxcvbn.dict` files are generated by the dictgen program compiled from +dict-generate.cpp (see makefile for details). + ##Using +Initially call `ZxcvbnInit()` with the pathname of the `zxcvbn.dict` file. This can be +omitted when dictionary data is included in the executable. + Call `ZxcvbnMatch()` with the password and optional user dictionary to get the entropy estimation and optional information on the password parts (which will need freeing with `ZxcvbnFreeInfo()` after use). Do this for each password to be tested, or as each character of it is entered into your program. The optional user dictionary can change between each call. -Review the test program in `examples/test.c` for an example. +Finally call `ZxcvbnUninit()` to free the dictionary data from read from file. This can be +omitted when dictionary data is included in the executable. + +Review the test program in `test.c` for an example. ## Differences from the original version. diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch deleted file mode 100644 index 4ce10a2..0000000 --- a/debian/patches/cross.patch +++ /dev/null @@ -1,21 +0,0 @@ -Index: zxcvbn-c-2.3+dfsg/makefile -=================================================================== ---- zxcvbn-c-2.3+dfsg.orig/makefile -+++ zxcvbn-c-2.3+dfsg/makefile -@@ -5,6 +5,7 @@ - CC ?= gcc - AR ?= ar - CXX ?= g++ -+CXX_FOR_BUILD ?= $(CXX) - - # need zxcvbn.h prior to package installation - CPPFLAGS += -I. -@@ -57,7 +58,7 @@ - ./dictgen -b -o zxcvbn.dict -h dict-crc.h $(WORDS) - - dictgen: dict-generate.cpp makefile -- $(CXX) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \ -+ $(CXX_FOR_BUILD) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \ - -o dictgen dict-generate.cpp $(LDFLAGS) - - test-c++inline: test.c zxcvbn-c++inline.o diff --git a/debian/patches/patch-README-for-Debian.patch b/debian/patches/patch-README-for-Debian.patch deleted file mode 100644 index 5ca893f..0000000 --- a/debian/patches/patch-README-for-Debian.patch +++ /dev/null @@ -1,58 +0,0 @@ -From: Sean Whitton <spwhitton@spwhitton.name> -Date: Sat, 24 Sep 2016 13:46:46 -0700 -Subject: patch README for Debian - -Remove build instructions, and functions for when zxcvbn-c ws compiled -with USE_DICT_FILE (see README.source). - -Forwarded: not-needed ---- - README.md | 19 +------------------ - 1 file changed, 1 insertion(+), 18 deletions(-) - ---- a/README.md -+++ b/README.md -@@ -11,42 +11,15 @@ The original coffee script version is av - An article on the reasons for zxcvbn is at - https://tech.dropox.com/2012/04/zxcvbn-realistic-password-strength-estimation - --##Building -- --The makefile will build several test programs to test the code. It shows the steps needed --to use the code in C and C++ programs, using the dictionary data read from file or included --within the program executable. --The makefile has only been tried on Linux using GCC version 4.8.4, but should be faily --portable to other systems. -- --When dictionary data is included in your program's executable, the files `zxcvbn.c` , --`zxcvbn.h` , `dict-src.h` are used in your program. -- --When dictionary data is read from file, the files `zxcvbn.c` , `zxcvbn.h` , `dict-crc.h` --and `zxcvbn.dict` are used in your program, compiled with `#define USE_DICT_FILE`. The CRC --of the dictionary data file is written to `dict-crc.h` so your executable can detect --corruption of the data. -- --Rename `zxcvbn.c` to `zxcvbn.cpp` (or whatever your compiler uses) to compile as C++. -- --The `dict*.h` and `zxcvbn.dict` files are generated by the dictgen program compiled from --dict-generate.cpp (see makefile for details). -- - ##Using - --Initially call `ZxcvbnInit()` with the pathname of the `zxcvbn.dict` file. This can be --omitted when dictionary data is included in the executable. -- - Call `ZxcvbnMatch()` with the password and optional user dictionary to get the entropy - estimation and optional information on the password parts (which will need freeing with - `ZxcvbnFreeInfo()` after use). Do this for each password to be tested, or as each character - of it is entered into your program. The optional user dictionary can change between each - call. - --Finally call `ZxcvbnUninit()` to free the dictionary data from read from file. This can be --omitted when dictionary data is included in the executable. -- --Review the test program in `test.c` for an example. -+Review the test program in `examples/test.c` for an example. - - - ## Differences from the original version. diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index 559c234..0000000 --- a/debian/patches/series +++ /dev/null @@ -1,2 +0,0 @@ -patch-README-for-Debian.patch -cross.patch @@ -5,7 +5,6 @@ CXXFLAGS ?= -O2 -Wall -Wextra CC ?= gcc AR ?= ar CXX ?= g++ -CXX_FOR_BUILD ?= $(CXX) # need zxcvbn.h prior to package installation CPPFLAGS += -I. @@ -58,7 +57,7 @@ dict-crc.h: dictgen $(WORDS) ./dictgen -b -o zxcvbn.dict -h dict-crc.h $(WORDS) dictgen: dict-generate.cpp makefile - $(CXX_FOR_BUILD) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \ + $(CXX) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \ -o dictgen dict-generate.cpp $(LDFLAGS) test-c++inline: test.c zxcvbn-c++inline.o |