aboutsummaryrefslogtreecommitdiff
path: root/src/System/Random/Crypto.hs
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@google.com>2018-09-04 12:27:10 -0500
committerGravatar Benjamin Barenblat <bbaren@google.com>2018-09-04 12:27:10 -0500
commit67b5043c69648f0e4b9d9138a03cce154c20e38d (patch)
tree9c73bceb27205c112fe97fad14eae6683e2d8d41 /src/System/Random/Crypto.hs
parentfadd7434be6bfc11483dc188aa6e4267e01d5c40 (diff)
Documentation improvements
Diffstat (limited to 'src/System/Random/Crypto.hs')
-rw-r--r--src/System/Random/Crypto.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/System/Random/Crypto.hs b/src/System/Random/Crypto.hs
index ed5706d..464555e 100644
--- a/src/System/Random/Crypto.hs
+++ b/src/System/Random/Crypto.hs
@@ -12,6 +12,12 @@
-- License for the specific language governing permissions and limitations under
-- the License.
+{-|
+ Module: System.Random.Crypto
+ Description: Cryptographically secure pseudorandom number generator
+ Copyright: 2018 Google LLC
+ License: Apache License, version 2.0
+-}
module System.Random.Crypto
( randomBytes
) where
@@ -22,7 +28,8 @@ import Foreign (allocaArray)
import BTLS.BoringSSL.Rand (randBytes)
import BTLS.Buffer (packCUStringLen)
--- | Generates a cryptographically random buffer of the specified size.
+-- | Generates a cryptographically random buffer of the specified size (in
+-- bytes).
randomBytes :: Int -> IO ByteString
randomBytes len =
allocaArray len $ \pBuf -> do