Giter Club home page Giter Club logo

cryptohash-sha1's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cryptohash-sha1's Issues

export `sha1` alias?

Hello, would you accept a patch to export aliases for hash, hashlazy, hmac, and hmaclazy that indicate the hash function being used? My use case is simply, I prefer not using qualified imports :)

Something like

sha1 :: ByteString -> ByteString
sha1lazy :: ByteString -> ByteString
hmacSha1 :: ByteString -> ByteString -> ByteString
hmacSha1lazy :: ByteString -> ByteString -> ByteString

Mismatching license headers

The LICENSE file is BSD-3 but source files, sha1.c and sha1.h, have BSD-2 copyright headers. Can this be fixed and re-released?

Thanks.

Crashes in `cabal repl` on Win 10

Repo with minimal reproduction: https://github.com/fendor/cryptohash-sha1-min-repr

Code:

import qualified Crypto.Hash.SHA1               as H

main :: IO ()
main = (H.updates H.init ["hello", "world", "efewfwefwefwef", "ewfwefwefwef"]) `seq` putStrLn "Loaded"

Success:

cabal run exes

But executing:

cabal repl
> main

Produces this error:


Access violation in generated code when reading 0xffffffffffffffff

 Attempting to reconstruct a stack trace...

   Frame        Code address
 * 0x777dd30    0xf7912e0 C:\Users\Privat\AppData\Roaming\cabal\store\ghc-8.6.5\cryptohash-sh_-0.11.10_-bea6299b379c28bda524952b226e6787957d6614\lib\libHScryptohash-sh_-0.11.10_-bea6299b379c28bda524952b226e6787957d6614.a(sha1.o)+0x11b0
                 (hs_cryptohash_sha1_init+0x0)
 * 0x777dd38    0xf780169 C:\Users\Privat\AppData\Roaming\cabal\store\ghc-8.6.5\cryptohash-sh_-0.11.10_-bea6299b379c28bda524952b226e6787957d6614\lib\libHScryptohash-sh_-0.11.10_-bea6299b379c28bda524952b226e6787957d6614.a(SHA1.o)+0x89
                 (cryptohashzmshzuzm0zi11zi10zuzmbea6299b379c28bda524952b226e6787957d6614_CryptoziHashziSHA1_init_info+0x67)
 * 0x777dd40    0x4dae610
 * 0x777dd48    0x7e244b8

cabal.exe: repl failed for exe:min-repr from min-repr-0.1.0.0. The build
process terminated with exit code 11

Didnt have time yet to test this behaviour with latest GHC.

EDIT:
Can not be reproduced on linux (nixos).

Deprecation warning about `memcpy` with newest `bytestring`

Shipping a fix for this warning would require a new release.

src/Crypto/Hash/SHA1.hs:133:19: warning: [GHC-68441] [-Wdeprecations]
    In the use of ‘memcpy’
    (imported from Data.ByteString.Internal, but defined in Data.ByteString.Internal.Type):
    Deprecated: "Use Foreign.Marshal.Utils.copyBytes instead"
    |
133 | copyCtx dst src = memcpy (castPtr dst) (castPtr src) (fromIntegral sizeCtx)
    |                   ^^^^^^

Support GHC 9.2

Lifted from:

Just the library builds fine on master.

To get build with tests and benchmarks started (as stated in cabal.project), try:

$ cabal build --allow-newer=cereal:base \
  --allow-newer=vector-th-unbox:base --allow-newer=vector-th-unbox:template-haskell \
  --allow-newer=microstache:base \
  --allow-newer=cassava:base \
  --allow-newer=aeson:{ghc-prim,template-haskell} \
  --allow-newer=hsc2hs:base

However, this fails on at least:

Support GHC-9.6

Seems like the bounds reject the base from GHC-9.6:

[__5] rejecting: binary-0.8.9.1/installed-0.8.9.1 (conflict: cryptohash-sha1
=> base>=4.5 && <4.18, binary => base==4.18.0.0/installed-4.18.0.0)

Allow-newer seems to work so maybe a revision is sufficient.

Would be nice to also cover cryptohash-md5.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.