diff options
author | Benjamin Barenblat <bbaren@google.com> | 2018-01-24 19:49:51 -0500 |
---|---|---|
committer | Benjamin Barenblat <bbaren@google.com> | 2018-01-24 19:49:51 -0500 |
commit | 1da0165678cb990160edcf376c4e6f08cccf8bf4 (patch) | |
tree | 363ce204d1f1a511f5ece5e05e08375059ace0d6 /btls.cabal | |
parent | 8da355a7ae419e71af847ff8571724af3263d634 (diff) |
Data.Digest.Sha2: Improve memory management
Rework the SHA-2 implementation to use the low-level sha.h interface
rather than the higher-level evp.h. This allows us to preallocate all
the data structures, eliminating BoringSSL cleanup functions. As a
result, we can implement hashing under `unsafeLocalState` (a.k.a.
`unsafeDupablePerformIO`) instead of `unsafePerformIO`, which should
improve performance in multithreaded programs.
Diffstat (limited to 'btls.cabal')
-rw-r--r-- | btls.cabal | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -21,6 +21,9 @@ library hs-source-dirs: src default-language: Haskell2010 other-extensions: CApiFFI + , ExistentialQuantification + , NamedFieldPuns + , Rank2Types build-tools: hsc2hs include-dirs: third_party/boringssl/src/include ghc-options: -Weverything @@ -31,7 +34,7 @@ library -optl-Wl,-z,relro -optl-Wl,-z,now -optl-Wl,-s exposed-modules: Data.Digest , Data.Digest.Sha2 - other-modules: Data.Digest.Evp + other-modules: Data.Digest.Internal -- Use special names for the BoringSSL libraries to avoid accidentally pulling -- in OpenSSL. extra-libraries: btls_crypto |