diff options
author | Benjamin Barenblat <bbaren@google.com> | 2018-09-04 12:27:10 -0500 |
---|---|---|
committer | Benjamin Barenblat <bbaren@google.com> | 2018-09-04 12:27:10 -0500 |
commit | 67b5043c69648f0e4b9d9138a03cce154c20e38d (patch) | |
tree | 9c73bceb27205c112fe97fad14eae6683e2d8d41 /src/System/Random/Crypto.hs | |
parent | fadd7434be6bfc11483dc188aa6e4267e01d5c40 (diff) |
Documentation improvements
Diffstat (limited to 'src/System/Random/Crypto.hs')
-rw-r--r-- | src/System/Random/Crypto.hs | 9 |
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 |