name:                g3p-hash
version:             1.0.0.0
synopsis:            Global Password Prehash Protocol
description:         A password hash and key derivation function that provides
                     embedded attributions in order to support self-documenting
                     deployments.
license:             Apache-2.0
license-file:        LICENSE
author:              Leon P Smith
maintainer:          Auth Global
copyright:           Auth Global
category:            Cryptography
build-type:          Simple
extra-source-files:  ChangeLog.md
                     g3p-test-vectors.json
cabal-version:       >=1.10

library
  exposed-modules:   Crypto.G3P
                     Crypto.G3P.BCrypt

  build-depends:     base < 5
                   , bytestring
                   , network-byte-order
                   , phkdf
                   , Stream
                   , tuplehash-utils
                   , vector
  hs-source-dirs:    lib
  c-sources:         csrc/bcrypt_raw.c
                     csrc/blowfish.c
  include-dirs:      csrc
  ghc-options:       -Wall
  default-language:  Haskell2010

test-suite test
  type:              exitcode-stdio-1.0
  hs-source-dirs:    test
  main-is:           Main.hs

  other-modules:     G3P

  build-depends:     base
                   , aeson >= 2
                   , base16
                   , bytestring
                   , containers
                   , g3p-hash
                   , Stream
                   , tasty
                   , tasty-hunit
                   , text
                   , vector
  default-language:  Haskell2010