packages feed

ppad-hmac-drbg-0.3.0: ppad-hmac-drbg.cabal

cabal-version:      3.0
name:               ppad-hmac-drbg
version:            0.3.0
synopsis:           HMAC-based deterministic random bit generator
license:            MIT
license-file:       LICENSE
author:             Jared Tobin
maintainer:         jared@ppad.tech
category:           Cryptography
build-type:         Simple
tested-with:        GHC == 9.10.3
extra-doc-files:    CHANGELOG
description:
  A pure implementation of the HMAC-DRBG CSPRNG, as specified by NIST-SP
  800-90A.

flag llvm
  description: Use GHC's LLVM backend.
  default:     False
  manual:      True

source-repository head
  type:     git
  location: git.ppad.tech/hmac-drbg.git

library
  default-language: Haskell2010
  hs-source-dirs:   lib
  ghc-options:
      -Wall
  if flag(llvm)
    ghc-options: -fllvm -O2
  exposed-modules:
      Crypto.DRBG.HMAC.Internal
    , Crypto.DRBG.HMAC.SHA256
    , Crypto.DRBG.HMAC.SHA512
  build-depends:
      base >= 4.9 && < 5
    , bytestring >= 0.9 && < 0.13
    , ppad-sha256 >= 0.3.2 && < 0.4
    , ppad-sha512 >= 0.2.2 && < 0.4
    , primitive >= 0.8 && < 0.10

test-suite hmac-drbg-tests
  type:                exitcode-stdio-1.0
  default-language:    Haskell2010
  hs-source-dirs:      test
  main-is:             Main.hs

  ghc-options:
    -rtsopts -Wall -O2

  build-depends:
      attoparsec
    , base
    , bytestring
    , ppad-base16
    , ppad-hmac-drbg
    , tasty
    , tasty-hunit

benchmark hmac-drbg-bench
  type:                exitcode-stdio-1.0
  default-language:    Haskell2010
  hs-source-dirs:      bench
  main-is:             Main.hs

  ghc-options:
    -rtsopts -O2 -Wall

  build-depends:
      base
    , bytestring
    , criterion
    , ppad-hmac-drbg

benchmark hmac-drbg-weigh
  type:                exitcode-stdio-1.0
  default-language:    Haskell2010
  hs-source-dirs:      bench
  main-is:             Weight.hs

  ghc-options:
    -rtsopts -O2 -Wall

  build-depends:
      base
    , bytestring
    , deepseq
    , ppad-hmac-drbg
    , weigh