index.js 300 B

123456789101112
  1. 'use strict'
  2. var createHash = require('create-hash')
  3. var bs58checkBase = require('./base')
  4. // SHA256(SHA256(buffer))
  5. function sha256x2 (buffer) {
  6. var tmp = createHash('sha256').update(buffer).digest()
  7. return createHash('sha256').update(tmp).digest()
  8. }
  9. module.exports = bs58checkBase(sha256x2)