packages feed

OTP-0.1.0.0: OTP.cabal

cabal-version: 1.12
name:          OTP
version:       0.1.0.0
synopsis:      HMAC-Based and Time-Based One-Time Passwords (HOTP & TOTP)

description:   Implements the /HMAC-Based One-Time Password Algorithm/ (HOTP) as
               defined in [RFC 4226](https://tools.ietf.org/html/rfc4226)
               and the /Time-Based One-Time Password Algorithm/ (TOTP) as defined
               in [RFC 6238](https://tools.ietf.org/html/rfc6238).
               .
               The TOTP and HOTP algorithms are commonly used to implement two-step verification (2FA)
               (e.g. by [Google Authenticator](https://en.wikipedia.org/wiki/Google_Authenticator) ).
               .
               See module "Data.OTP" for API documentation.

license:       MIT
license-file:  LICENSE
copyright:     2012 Artem Leshchev,
               2016 Aleksey Uimanov,
               2018 Herbert Valerio Riedel
author:        Artem Leshchev,
               Aleksey Uimanov,
               Herbert Valerio Riedel
maintainer:    hvr@gnu.org
homepage:      https://github.com/hvr/OTP
bug-reports:   https://github.com/hvr/OTP/issues
category:      Cryptography
build-type:    Simple
tested-with:   GHC==8.4.3, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2

extra-source-files:
  CHANGELOG.md
  README.md

source-repository head
  type:     git
  location: https://github.com/hvr/OTP.git

flag pure-sha
  manual: True
  default: False
  description: Use pure Haskell [SHA](http://hackage.haskell.org/package/SHA) implementation instead of @cryptohash-sha1\/256\/512@

library
  hs-source-dirs:     src
  exposed-modules:    Data.OTP
  other-modules:      HashImpl

  default-language:   Haskell2010
  other-extensions:   CPP

  if flag(pure-sha)
    build-depends:    SHA                >= 1.6.4.4    && < 1.7
                    , bytestring         >= 0.10.0.0   && < 0.11
                    , base               >= 4.3.0.0    && < 4.12
                    , time               >= 1.2        && < 1.9
  else
    build-depends:    cryptohash-sha1    >= 0.11.100.1 && < 0.12
                    , cryptohash-sha256  >= 0.11.100.1 && < 0.12
                    , cryptohash-sha512  >= 0.11.100.1 && < 0.12
                    , bytestring         >= 0.9.2.0    && < 0.11
                    , base               >= 4.5.0.0    && < 4.12
                    , time               >= 1.4        && < 1.9

  ghc-options:        -Wall


test-suite tests
  type:               exitcode-stdio-1.0

  hs-source-dirs:     test
  main-is:            Test.hs

  default-language:   Haskell2010
  other-extensions:   OverloadedStrings

  build-depends:      base
                    , bytestring
                    , OTP
                    , time
                    -- dependency constraints not inherited via 'OTP' component
                    , tasty == 1.1.*
                    , tasty-hunit == 0.10.*

  ghc-options:        -Wall