ripemd160-js

    1.2.0 • Public • Published

    RIPEMD1600 logo

    ripemd160-js

    NPM Package CI status License: MIT

    A Universal JavaScript RIPEMD160 cryptographic hash function.

    Features

    • Zero dependencies.
    • Adds 3.4 kB to bundle.

    Setup

    $ npm i ripemd160-js

    Support

    API

    function ripemd160

    Performs the message digest algorithm RIPEMD160 on input data.

    Parameter Type Description
    message string | Uint8Array Data to hash.

    Returns: string | Uint8Array — Preserves the data return type.

    Examples

    Ways to import.

    import ripemd160 from 'ripemd160-js'

    Ways to require.

    const ripemd160 = require('ripemd160-js')

    Usage Sting ripemd160.

    ripemd160('hello').then(console.log)

    The logged output will be “108f07b8382412612c048d07d13f814118445acd”.

    Usage Uint8Array ripemd160.

    const print_hex = array => Buffer.from(array).toString('hex')
    ripemd160(new Uint8Array([1, 2, 3])).then(print_hex)

    The logged output will be “79f901da2609f020adadbf2e5f68a16c8c3f7d57”

    Install

    npm i ripemd160-js

    DownloadsWeekly Downloads

    6

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    26.7 kB

    Total Files

    5

    Last publish

    Collaborators

    • pur3miish