packages feed

one-time-password-3.0.1.0: one-time-password.cabal

cabal-version:      3.4
name:               one-time-password
version:            3.0.1.0
synopsis:           HMAC-Based and Time-Based One-Time Passwords
description:
  Implements HMAC-Based One-Time Password Algorithm as
  defined in RFC 4226 and Time-Based One-Time Password
  Algorithm as defined in RFC 6238.

license:            MIT
license-file:       LICENSE
copyright:          (c) 2023 The Haskell Cryptography Group
author:             Hécate Moonlight
maintainer:         The Haskell Cryptography Group contributors
homepage:           https://github.com/haskell-cryptography/one-time-password
bug-reports:
  https://github.com/haskell-cryptography/one-time-password/issues

category:           Cryptography
build-type:         Simple
extra-source-files: README.md
extra-doc-files:    CHANGELOG.md
tested-with:
  GHC ==9.4.8 || ==9.6.4 || ==9.6.7 || ==9.8.2 || ==9.8.4 || ==9.10.2

source-repository head
  type:     git
  location:
    https://github.com/haskell-cryptography/one-time-password.git

common ghc-options
  ghc-options:
    -Wall -Wcompat -Widentities -Wincomplete-record-updates
    -Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints
    -fhide-source-paths -Wno-unused-do-bind -fshow-hole-constraints
    -Wno-unticked-promoted-constructors -Werror=unused-imports
    -fdicts-strict -fmax-worker-args=16 -fspec-constr-recursive=16
    -Wunused-packages

  default-language: GHC2021

library
  import:          ghc-options
  hs-source-dirs:  src

  -- cabal-fmt: expand src/
  exposed-modules:
    OTP.Commons
    OTP.HOTP
    OTP.TOTP

  build-depends:
    , base                 >=4.17   && <5
    , bytestring           ^>=0.12
    , cereal               ^>=0.5
    , chronos              ^>=1.1.6
    , cryptohash-sha1      ^>=0.11
    , network-uri          ^>=2.6
    , sel                  ^>=0.1
    , text                 >=2.0
    , text-builder-linear  >=0.1
    , text-display         ^>=1.0

  ghc-options:     -Wall

test-suite tests
  import:             ghc-options
  type:               exitcode-stdio-1.0
  hs-source-dirs:     test
  default-extensions: OverloadedStrings
  main-is:            Test.hs
  other-modules:
    Test.Comparison
    Test.HOTP
    Test.Properties
    Test.TOTP
    Test.Utils

  build-depends:
    , base               >=4.17 && <5
    , base16
    , base32             >=0.4
    , bytestring
    , chronos
    , cryptonite
    , one-time-password
    , sel
    , tasty
    , tasty-hunit
    , tasty-quickcheck
    , text
    , text-display
    , torsor

executable one-time-password
  import:             ghc-options
  main-is:            Main.hs
  hs-source-dirs:     app
  default-extensions:
    DataKinds
    DefaultSignatures
    DeriveAnyClass
    DeriveGeneric
    DerivingStrategies
    DerivingVia
    DuplicateRecordFields
    FlexibleContexts
    GADTs
    GeneralizedNewtypeDeriving
    KindSignatures
    LambdaCase
    OverloadedRecordDot
    OverloadedStrings
    RankNTypes
    RecordWildCards
    ScopedTypeVariables
    TypeApplications
    TypeFamilies
    TypeOperators

  build-depends:
    , base                  >=4.17 && <5
    , bytestring
    , chronos
    , one-time-password
    , optparse-applicative  >=0.15 && <0.19
    , sel
    , text
    , text-display
    , torsor                ^>=0.1

  other-modules:      Paths_one_time_password
  autogen-modules:    Paths_one_time_password
  ghc-options:        -Wall