{-# LANGUAGE RecordWildCards     #-}

module Passman.Engine.Strength where

import           Math.NumberTheory.Logarithms (intLog2)

data Strength = Strength { strengthName       :: String
                         , strengthBits       :: Int
                         , strengthIterations :: Int
                         }


strengthIsLegacy :: Strength -> Bool
strengthIsLegacy Strength{..} = intLog2 strengthIterations * strengthBits < 1000
