diff options
author | sbrunel <sbrunel62@gmail.com> | 2017-07-10 15:22:16 +0200 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-07-10 08:22:16 -0500 |
commit | aa3f44dcab478084c83384ff377cf4bc66337d1f (patch) | |
tree | 06c3feed4f3cc4730843db3e2534cd410ca3b19f | |
parent | be297d043e82f6c7b5b2f672d2e94e7b6b43f13c (diff) | |
download | py-bcrypt-git-aa3f44dcab478084c83384ff377cf4bc66337d1f.tar.gz |
Fixes link editing errors in msys / mingw64 (#116)
-rw-r--r-- | src/_csrc/bcrypt_pbkdf.c | 4 | ||||
-rw-r--r-- | src/_csrc/blf.h | 3 | ||||
-rw-r--r-- | src/_csrc/pycabcrypt.h | 6 |
3 files changed, 10 insertions, 3 deletions
diff --git a/src/_csrc/bcrypt_pbkdf.c b/src/_csrc/bcrypt_pbkdf.c index 453fdaa..306d7e7 100644 --- a/src/_csrc/bcrypt_pbkdf.c +++ b/src/_csrc/bcrypt_pbkdf.c @@ -16,12 +16,12 @@ */ #include <sys/types.h> +#include <stdlib.h> +#include <string.h> #include "pycabcrypt.h" -#include <stdlib.h> #include "blf.h" #include "sha2.h" -#include <string.h> #define MINIMUM(a,b) (((a) < (b)) ? (a) : (b)) diff --git a/src/_csrc/blf.h b/src/_csrc/blf.h index 82ab948..5f06171 100644 --- a/src/_csrc/blf.h +++ b/src/_csrc/blf.h @@ -31,11 +31,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "pycabcrypt.h" #ifndef _BLF_H_ #define _BLF_H_ +#include "pycabcrypt.h" + /* Schneier states the maximum key length to be 56 bytes. * The way how the subkeys are initialized by the key up * to (N+2)*4 i.e. 72 bytes are utilized. diff --git a/src/_csrc/pycabcrypt.h b/src/_csrc/pycabcrypt.h index b71f577..b905459 100644 --- a/src/_csrc/pycabcrypt.h +++ b/src/_csrc/pycabcrypt.h @@ -1,3 +1,6 @@ +#ifndef PYCABCRYPT +#define PYCABCRYPT + #include <sys/types.h> #include <string.h> #include <stdio.h> @@ -30,3 +33,6 @@ int bcrypt_hashpass(const char *key, const char *salt, char *encrypted, size_t e int encode_base64(char *, const u_int8_t *, size_t); int timingsafe_bcmp(const void *b1, const void *b2, size_t n); int bcrypt_pbkdf(const char *pass, size_t passlen, const uint8_t *salt, size_t saltlen, uint8_t *key, size_t keylen, unsigned int rounds); + +#endif + |