name:                phkdf
version:             0.1.0.0
synopsis:
    Toolkit for self-documenting password hash and key derivation functions.

description:
    Inspired by PBKDF2, HKDF, and TupleHash. Uses HMAC-SHA256 as a primitive.

    This is primarily intended to be a highly reliable reference implementation
    for the underlying PHKDF primitives. It also aspires to be production
    ready-ish. The main limitation is that it implemented without mutation,
    meaning that potentially sensitive secrets persist in memory longer than
    necessary.

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
                     phkdf-test-vectors.json
cabal-version:       >=1.10

library
  exposed-modules:
                     Crypto.PHKDF
                     Crypto.PHKDF.Assert
                     Crypto.PHKDF.Subtle
                     Crypto.Encoding.PHKDF
                     Crypto.Encoding.PHKDF.V1
                     Crypto.PHKDF.Primitives
                     Crypto.PHKDF.Primitives.Assert
                     Crypto.PHKDF.Primitives.Subtle
                     Crypto.PHKDF.V1.Cookbook
                     Crypto.PHKDF.HMAC
                     Crypto.PHKDF.HMAC.Subtle

  build-depends:     base < 5
                   , bytestring >= 0.11.1.0
                   , sha256
                   , network-byte-order
                   , Stream
                   , tuplehash-utils >= 0.1
                   , vector

  ghc-options:       -Wall

  hs-source-dirs:    lib
  default-language:  Haskell2010

source-repository head
  type:     git
  location: https://github.com/auth-global/self-documenting-cryptography
  subdir:   phkdf

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

  other-modules:     HMAC
                     PHKDF

  build-depends:     base < 5
                   , aeson >= 2
                   , base16 >= 1
                   , bytestring
                   , containers
                   , phkdf
                   , quickcheck-instances
                   , Stream
                   , tasty
                   , tasty-hunit
                   , tasty-quickcheck
                   , text
                   , vector

  default-language:  Haskell2010