Safe Haskell | Safe-Infered |
---|
Crypto.Util
Description
A small selection of utilities that might be of use to others working with bytestring/number combinations.
- incBS :: ByteString -> ByteString
- i2bs :: Int -> Integer -> ByteString
- bs2i :: ByteString -> Integer
Documentation
incBS :: ByteString -> ByteStringSource
incBS bs
inefficiently computes the value i2bs (8 * B.length bs) (bs2i bs + 1)
i2bs :: Int -> Integer -> ByteStringSource
i2bs bitLen i
converts i
to a ByteString
of bitLen
bits (must be a multiple of 8).