@string-hashing/md5

0.0.1 • Public • Published

@string-hashing/md5

MD5 bytestring hashing for JavaScript. See docs.

import {alloc} from '@array-like/alloc';
import * as ascii from '@codec-bytes/ascii';
import * as base16 from '@codec-bytes/base16';
import {md5} from '@string-hashing/md5';
const string = 'The quick brown fox jumps over the lazy dog';
const bytes = ascii.encode(string);
const digest = md5(bytes, bytes.length * 8, alloc(16));
digest; // [0x9e, 0x10, 0x7d, 0x9d, 0x37, 0x2b, 0xb6, 0x82, 0x6b, 0xd8, ...]
base16.decode(digest); // '9E107D9D372BB6826BD81D3542A419D6'

License Version Tests Dependencies GitHub issues Downloads

Code issues Code maintainability Code coverage (cov) Code technical debt Documentation Package size

/@string-hashing/md5/

    Package Sidebar

    Install

    npm i @string-hashing/md5

    Weekly Downloads

    1

    Version

    0.0.1

    License

    AGPL-3.0

    Unpacked Size

    582 kB

    Total Files

    14

    Last publish

    Collaborators

    • raskat