aboutsummaryrefslogtreecommitdiff
path: root/src/System/Random/Crypto.hs
diff options
context:
space:
mode:
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