From 7baa1745a4c6a87f1252ce95e08907c7d7bede68 Mon Sep 17 00:00:00 2001 From: Mark Vayngrib Date: Sat, 23 Jan 2016 10:51:33 -0500 Subject: [PATCH] update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 93ea85d..4dfc0d0 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,13 @@ Note: only the asynchronous API is supported, due to the limitations of having t ```js var randomBytes = require('react-native-randombytes') + +// synchronous API +// uses SJCL +var rand = randomBytes(4) + +// asynchronous API +// uses iOS-side SecRandomCopyBytes randomBytes(4, (err, bytes) => { console.log(bytes.toString('hex')) })