Use node.js crypto API where available.