cipher-aes 0.1.2 → 0.1.3
raw patch · 3 files changed
+16/−23 lines, 3 filesdep −crypto-apiPVP ok
version bump matches the API change (PVP)
Dependencies removed: crypto-api
API changes (from Hackage documentation)
Files
- cbits/aes_x86ni.c +5/−0
- cbits/aes_x86ni.h +4/−0
- cipher-aes.cabal +7/−23
cbits/aes_x86ni.c view
@@ -27,6 +27,9 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */++#ifdef WITH_AESNI+ #include <wmmintrin.h> #include <tmmintrin.h> #include "aes.h"@@ -266,5 +269,7 @@ } } while (0); }++#endif #endif
cbits/aes_x86ni.h view
@@ -31,6 +31,8 @@ #ifndef AES_X86NI_H #define AES_X86NI_H +#ifdef WITH_AESNI+ #if defined(__i386__) || defined(__x86_64__) #include <wmmintrin.h>@@ -46,6 +48,8 @@ uint8_t *_tweak, uint32_t spoint, uint8_t *in, uint32_t blocks); void gf_mul_x86ni(block128 *res, block128 *a_, block128 *b_);++#endif #endif
cipher-aes.cabal view
@@ -1,5 +1,5 @@ Name: cipher-aes-Version: 0.1.2+Version: 0.1.3 Description: Fast AES cipher implementation with advanced mode of operations. .@@ -29,10 +29,6 @@ Extra-Source-Files: Tests/*.hs cbits/*.h -Flag benchmark- Description: Build benchmarks- Default: False- Library Build-Depends: base >= 4 && < 5 , bytestring@@ -41,43 +37,31 @@ C-sources: cbits/aes_generic.c cbits/aes.c cbits/gf.c- cbits/aes_x86ni.c cbits/cpu.c- if arch(i386) || arch(x86_64)- CC-options: -mssse3 -maes -mpclmul+ if os(linux) && (arch(i386) || arch(x86_64))+ CC-options: -mssse3 -maes -mpclmul -DWITH_AESNI+ C-sources: cbits/aes_x86ni.c Test-Suite test-cipher-aes type: exitcode-stdio-1.0 hs-source-dirs: Tests Main-Is: Tests.hs Build-depends: base >= 4 && < 5- , crypto-api >= 0.5 , cipher-aes , bytestring , QuickCheck >= 2 , test-framework >= 0.3.3 && < 0.7 , test-framework-quickcheck2 >= 0.2.9 && < 0.3 -Executable Benchmarks+Benchmark bench-cipher-aes hs-source-dirs: Benchmarks Main-Is: Benchmarks.hs- if flag(benchmark)- Buildable: True- Build-depends: base >= 4 && < 5+ type: exitcode-stdio-1.0+ Build-depends: base >= 4 && < 5 , bytestring- , crypto-api , cipher-aes , criterion , mtl- else- Buildable: False- C-sources: cbits/aes_generic.c- cbits/aes.c- cbits/gf.c- cbits/aes_x86ni.c- cbits/cpu.c- if arch(i386) || arch(x86_64)- CC-options: -mssse3 -maes -mpclmul source-repository head type: git