Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Documentation fixes (formatting)

Ignore-this: 3ea22ce39fdc7b6aeb2acaa7c2945763

darcs-hash:20100907154608-cef97-5f81e242d34822f62d3f588045176658c51fca12.gz
  • Loading branch information...
commit 3379289bfdf93331aef2be47064e6f386faba766 1 parent 6355636
@TomMD authored
View
14 Crypto/Random.hs
@@ -8,14 +8,12 @@
This module is for instantiating cryptographically strong determinitic random bit generators (DRBGs, aka PRNGs)
For the simple use case of using the system random number generator ('System.Crypto.Random') to seed the DRBG:
-@
- g <- newGenIO
+@ g <- newGenIO
@
Users needing to provide their own entropy can call 'newGen' directly
-@
- entropy <- getEntropy nrBytes
+@ entropy <- getEntropy nrBytes
let generator = newGen entropy
@
@@ -84,7 +82,11 @@ class CryptoRandomGen g where
-- additional input @entropy@ in the generation of the requested data to
-- increase the confidence our generated data is a secure random stream.
--
- -- Default: @genBytesWithEntropy g bytes entropy = entropy `xor` genBytes g bytes@
+ -- Default:
+ --
+ -- @
+ -- genBytesWithEntropy g bytes entropy = xor entropy (genBytes g bytes)
+ -- @
genBytesWithEntropy :: g -> ByteLength -> B.ByteString -> Either GenError (B.ByteString, g)
genBytesWithEntropy g len entropy =
let res = genBytes g len
@@ -103,7 +105,7 @@ class CryptoRandomGen g where
class SplittableGen g where
split :: g -> (g,g)
--- |Use "System.Crypto.Random" to obtain entropy for newGen.
+-- |Use "System.Crypto.Random" to obtain entropy for `newGen`.
newGenIO :: CryptoRandomGen g => IO g
newGenIO = do
let r = undefined
View
3  System/Crypto/Random.hs
@@ -2,8 +2,7 @@
{-|
Maintainer: Thomas.DuBuisson@gmail.com
Stability: beta
- Portability: portable
-
+ Portability: portable
Obtain entropy from system sources. This module is rather untested on Windows (or testers never provided feedback),
though testing was requested from the community - please e-mail the maintainer with test results.
View
26 Test/Crypto.hs
@@ -1,22 +1,24 @@
{-# LANGUAGE OverloadedStrings, ExistentialQuantification, ViewPatterns #-}
-{-|
- Maintainer: Thomas.DuBuisson@gmail.com
- Stability: beta
- Portability: portable
+{- |
+ Maintainer: Thomas.DuBuisson@gmail.com
+ Stability: beta
+ Portability: portable
+
Basic tests for some common cryptographic algorithms
-
- Most user only need to run the {make,run}Tests functions:
-
-> runTests (makeMD5Tests (undefined :: MD5Digest))
-
+ Most user only need to run the {make,run}Tests functions:
+
+@ runTests (makeMD5Tests (undefined :: MD5Digest))
+@
+
or
-> runTests =<< makeAESTests (undefined :: AESKey)
-
+@ runTests =<< makeAESTests (undefined :: AESKey)
+@
+
TODO: More KATs are needed - particularly ones for non-AES, SHA, or MD5
algorithms.
- -}
+-}
module Test.Crypto
(
-- * Test Infrastructure
View
2  crypto-api.cabal
@@ -13,7 +13,7 @@ description: A generic interface for cryptographic operations,
Maintainers of hash and cipher implementations are
encouraged to add instances for the classes defined
in Crypto.Classes. Crypto users are similarly
- encoraged to use the interfaces defined in the Classes
+ encouraged to use the interfaces defined in the Classes
module.
Any concepts or functions of general use to more than
Please sign in to comment.
Something went wrong with that request. Please try again.