UNPKG

btc-minikeytools

Version:

BTC-MiniKeyTools is a robust tool for working with Bitcoin Mini private keys. It provides validation, key generation, and conversion functionalities, including HEX and Wallet Import Format (WIF) keys. Fully equipped with CLI support and logging options, i

15 lines (11 loc) 318 B
const crypto = require('crypto'); /** * Computes the SHA256 hash of a given input. * * @param {string|Buffer} input - The input to hash. * @returns {Buffer} - The SHA256 hash as a buffer. */ function sha256(input) { return crypto.createHash('sha256').update(input).digest(); } module.exports = { sha256 };