Git Product home page Git Product logo

javascript-md5's People

Contributors

blueimp avatar connormiha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

javascript-md5's Issues

substitution of unescape

unescape is not recommended to use now,so is there any substitution?

The unescape() function computes a new string in which hexadecimal escape sequences are replaced with the character that it represents. The escape sequences might be introduced by a function like escape. Usually, decodeURI or decodeURIComponent are preferred over unescape.

Please include a copy of the MIT license

Hi there. From a distribution packaging point of view it would be awesome if you could include a copy of the MIT license with your software, usually in a file called LICENSE.

Thanks!

safe_add in md5.js (signed vs unsigned int)

I wasn't satisfied with the results of the safe_add function, seeing how 0x7FFFF + 1 resulted in -0x80000 for me.
Changing line 33 to:
return ((msw << 16) | (lsw & 0xFFFF)) >>> 0;
results in 0x7FFFF + 1 returning 0x80000 instead.

Binary data hash error

I am trying to migrate from node-forge to blueimp-mp5 + web crypto api.
I created test script:

` var hex = 'B955EF8C83544AD74F803321866F005A';

var bytesStr = forge.util.hexToBytes(hex);

var data = bytesStr;
var h1 = forge.md.md5.create().start().update(data).digest().getBytes();
var h2 = md5(data, null, true);

console.log("H1: ", h1);
console.log("H2: ", h2);`

If 'data' is normal string, everything seems to work fine. But if 'data' is binary (like in example), hashes are different.
Am I doing something wrong or is it bug please?

Add TypeScript types to local file

This project got types in DefinitelyTyped, but if you want to copy paste the source code md5.js directly into your TypeScript project you could do it as follows:

  1. Create a new directory in your project called md5
  2. Copy paste the content of md5.js (or the minified version) into a file called index.js in the md5 directory
  3. Create a new file index.d.ts where you insert the following typings:
    export default md5;
    /**
     * Calculates MD5 value for a given string.
     * If a key is provided, calculates the HMAC-MD5 value.
     * Returns a Hex encoded string unless the raw argument is given.
     *
     * @param {string} string Input string
     * @param {string} [key] HMAC key
     * @param {boolean} [raw] Raw output switch
     * @returns {string} MD5 output
     */
    declare function md5(string: string, key?: string, raw?: boolean): string;
  4. Use it in your TypeScript files as all other modules:
    import md5 from './md5'
    
    md5("Some string")

Support for es modules usage?

I tried import Md5 from "blueimp-md5"
but get
Uncaught SyntaxError: The requested module '/@modules/blueimp-md5/js/md5.js' does not provide an export named 'default'

I tried

import * as Md5 from "blueimp-md5"

Md5(email)

but get Uncaught TypeError: Cannot set property 'md5' of undefined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.