paixaop/node-sodium — pull request #27 by jonasfj (2014-11-11 08:08:12+00:00)
Title: Support for latest node 0.11 (using nan)

I was looking at adding support for node 0.11. And found [nan](https://github.com/rvagg/nan) apparent v8 and node 0.11 is a moving target. All in all it's not worse than the macros already defined in `sodium.cc`, in fact I was able to replace a few of them.

Also the macros from nan has reasonable documentation, some even has examples (See the nan project page).

I can't promise that there is no memory leaks, or other horrible things... But all tests pass and it compiles on both node `0.11` and `0.10`. In fact nan promises to support node 0.6, 0.8 and 0.10, along with latest node 0.11 and presumably node 0.12 when that comes out.

We might have use more Nan-macros in the future. But this seems to work for now. I realize there is a lot of code to view... But mostly it's simply changing the patterns to use nan macros.

**Remark** this builds on top of my previous PR for adding `fromSeed` see PR #26