UNPKG

multiformats

Version:

Interface for multihash, multicodec, multibase and CID

9 lines 281 B
import crypto from 'crypto'; import { coerce } from '../bytes.js'; import { from } from './hasher.js'; export const sha1 = from({ name: 'sha-1', code: 0x11, encode: (input) => coerce(crypto.createHash('sha1').update(input).digest()) }); //# sourceMappingURL=sha1.js.map