improve coverage and style for crypto/ folder

![screenshot from 2014-12-19 19 34 00](https://cloud.githubusercontent.com/assets/287189/5512152/0d7d9278-87b6-11e4-8e00-3c55985b96fc.png)

(random.js can't be improved because it has some browser-specific code :disappointed: )

Please explain this change (and the original problem). Wouldn't it be better to raise an exception here?