Updated the csprng with new api functionality.