partial implementation of node's `crypto` for the browser