crypto-numbers 0.1.2 → 0.1.3
raw patch · 3 files changed
+6/−3 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Crypto/Number/Generate.hs +4/−2
- Tests/Tests.hs +1/−0
- crypto-numbers.cabal +1/−1
Crypto/Number/Generate.hs view
@@ -16,8 +16,10 @@ import qualified Data.ByteString as B import Data.Bits ((.|.)) --- | generate a positive integer between 0 and m.--- using as many bytes as necessary to the same size as m, that are converted to integer.+-- | generate a positive integer x, s.t. 0 <= x < m+--+-- Note that depending on m value, the number distribution+-- generated by this function is not necessarily uniform. generateMax :: CPRG g => g -> Integer -> (Integer, g) generateMax rng m = withRandomBytes rng (lengthBytes m) $ \bs -> os2ip bs `mod` m
Tests/Tests.hs view
@@ -12,6 +12,7 @@ import Control.Applicative ((<$>)) import qualified Data.ByteString as B+import Data.ByteString.Char8 () -- orphan IsString instance import Crypto.Number.ModArithmetic import Crypto.Number.Basic
crypto-numbers.cabal view
@@ -1,5 +1,5 @@ Name: crypto-numbers-Version: 0.1.2+Version: 0.1.3 Description: Cryptographic numbers: functions and algorithms License: BSD3 License-file: LICENSE