Merge pull request #5 from nevyn/master

Fix usage of dangling pointer
Fix SecRandom include

Change-Id: I85691e17980e9742aaa62a68568ebb76007daeb3