packages feed

RSA 1.0.3 → 1.0.4

raw patch · 2 files changed

+8/−3 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Codec/Crypto/RSA.hs view
@@ -506,9 +506,14 @@ -- "i2osp converts a nonnegative integer to an octet string of a specified -- length" -- RFC 3447 i2osp :: Integral a => a -> Int64 -> ByteString-i2osp x len | x >= (256 ^ len) = error "RSA internal error: integer too large"-            | otherwise = padding `BS.append` digits+i2osp x len | isTooLarge = error "RSA internal error: integer too large"+            | otherwise  = padding `BS.append` digits  where+  isTooLarge = xAsInt >= (256 ^ lenAsInt)+  xAsInt, lenAsInt :: Integer+  xAsInt     = fromIntegral x+  lenAsInt   = fromIntegral len+  --   padding = BS.replicate (len - BS.length digits) 0   digits = BS.pack $ reverse $ digits256 x   digits256 v 
RSA.cabal view
@@ -1,6 +1,6 @@ name:       RSA category:   Cryptography, Codec-version:    1.0.3+version:    1.0.4 license:    BSD3 license-file: LICENSE author:     Adam Wick <awick@galois.com>