hash-string 0.1.0.1 → 0.1.0.2
raw patch · 5 files changed
+26/−25 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- csrc/hs_hashstring_base16.c +5/−5
- csrc/hs_hashstring_base16.h +5/−5
- csrc/hs_hashstring_xor.c +7/−7
- csrc/hs_hashstring_xor.h +7/−7
- hash-string.cabal +2/−1
csrc/hs_hashstring_base16.c view
@@ -133,7 +133,7 @@ // *** Main Functions *** // ********************** -int hs_hashstring_hexDecode(void *dest, const char *src, size_t srcLen)+int hs_hashstring_hexDecode(void *restrict dest, const char *restrict src, size_t srcLen) { int err = 0; @@ -152,7 +152,7 @@ return err != 0; } -int hs_hashstring_hexDecodeLower(void *dest, const char *src, size_t srcLen)+int hs_hashstring_hexDecodeLower(void *restrict dest, const char *restrict src, size_t srcLen) { int err = 0; @@ -171,7 +171,7 @@ return err != 0; } -int hs_hashstring_hexDecodeUpper(void *dest, const char *src, size_t srcLen)+int hs_hashstring_hexDecodeUpper(void *restrict dest, const char *restrict src, size_t srcLen) { int err = 0; @@ -190,7 +190,7 @@ return err != 0; } -void hs_hashstring_hexEncode(char *dest, const void *src, size_t srcLen)+void hs_hashstring_hexEncode(char *restrict dest, const void *restrict src, size_t srcLen) { for (size_t i = 0; i < srcLen; i++) {@@ -199,7 +199,7 @@ dest[2 * srcLen] = 0; } -void hs_hashstring_hexEncodeUpper(char *dest, const void *src, size_t srcLen)+void hs_hashstring_hexEncodeUpper(char *restrict dest, const void *restrict src, size_t srcLen) { for (size_t i = 0; i < srcLen; i++) {
csrc/hs_hashstring_base16.h view
@@ -23,8 +23,8 @@ #include <stddef.h> -int hs_hashstring_hexDecode (void *dest, const char *src, size_t srcLen);-int hs_hashstring_hexDecodeLower(void *dest, const char *src, size_t srcLen);-int hs_hashstring_hexDecodeUpper(void *dest, const char *src, size_t srcLen);-void hs_hashstring_hexEncode (char *dest, const void *src, size_t srcLen);-void hs_hashstring_hexEncodeUpper(char *dest, const void *src, size_t srcLen);+int hs_hashstring_hexDecode (void *restrict dest, const char *restrict src, size_t srcLen);+int hs_hashstring_hexDecodeLower(void *restrict dest, const char *restrict src, size_t srcLen);+int hs_hashstring_hexDecodeUpper(void *restrict dest, const char *restrict src, size_t srcLen);+void hs_hashstring_hexEncode (char *restrict dest, const void *restrict src, size_t srcLen);+void hs_hashstring_hexEncodeUpper(char *restrict dest, const void *restrict src, size_t srcLen);
csrc/hs_hashstring_xor.c view
@@ -3,8 +3,8 @@ void hs_hashstring_xormin- ( const uint8_t *const restrict a,- const uint8_t *const restrict b,+ ( const uint8_t *const a,+ const uint8_t *const b, const size_t len, uint8_t *const restrict out ) {@@ -15,9 +15,9 @@ void hs_hashstring_xormax- ( const uint8_t *const restrict a,+ ( const uint8_t *const a, const size_t alen,- const uint8_t *const restrict b,+ const uint8_t *const b, const size_t blen, uint8_t *const restrict out ) {@@ -32,9 +32,9 @@ void hs_hashstring_xorleft- ( const uint8_t *const restrict a,+ ( const uint8_t *const a, const size_t alen,- const uint8_t *const restrict b,+ const uint8_t *const b, const size_t blen, uint8_t *const restrict out ) {@@ -47,7 +47,7 @@ } void hs_hashstring_xormutate- ( const uint8_t *const restrict a,+ ( const uint8_t *const a, const size_t len, uint8_t *const restrict out ) {
csrc/hs_hashstring_xor.h view
@@ -4,29 +4,29 @@ void hs_hashstring_xormin- ( const uint8_t *const restrict a,- const uint8_t *const restrict b,+ ( const uint8_t *const a,+ const uint8_t *const b, const size_t len, uint8_t *const restrict out ); void hs_hashstring_xormax- ( const uint8_t *const restrict a,+ ( const uint8_t *const a, const size_t alen,- const uint8_t *const restrict b,+ const uint8_t *const b, const size_t blen, uint8_t *const restrict out ); void hs_hashstring_xorleft- ( const uint8_t *const restrict a,+ ( const uint8_t *const a, const size_t alen,- const uint8_t *const restrict b,+ const uint8_t *const b, const size_t blen, uint8_t *const restrict out ); void hs_hashstring_xormutate- ( const uint8_t *const restrict a,+ ( const uint8_t *const a, const size_t alen, uint8_t *const restrict out );
hash-string.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.24 name: hash-string-version: 0.1.0.1+version: 0.1.0.2 synopsis: binary strings supporting constant-time base16 and comparisons description:@@ -41,6 +41,7 @@ -- csrc/hs_hashstring_base64.c csrc/hs_hashstring_xor.c + cc-options: -ftree-vectorize default-language: Haskell2010 source-repository head