How to use the md5.hex_md5 function in md5

To help you get started, we’ve selected a few md5 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mozillaarchive / deuxdrop / clients / server.js View on Github external
response.on('end', function () {
            if (responseData) {
              responseData = JSON.parse(responseData);

              if (responseData.status === 'failure') {
                sendSignInComplete(data, client, null);
              } else {
                id = responseData.email;
                pic = 'http://www.gravatar.com/avatar/' +
                      md5.hex_md5(id.trim().toLowerCase());

                // Store the user data for next request.
                redis.set('browserid-assertion-' + assertion, id);

                //Add the user ID to the list of users.
                redis.sadd('users', id);

                //Add the user to the store
                redis.hmset(id, 'id', id, 'name', id, 'pic', pic);

                sendSignInComplete(data, client, {
                  id: id,
                  name: id,
                  pic: pic
                });
              }
github mozillaarchive / deuxdrop / servers / lib / rdservers / fakefakeserver.js View on Github external
'signIn': function (data, client) {
    var id = data.userId,
        name = data.userName,
        clientList = clients[id] || (clients[id] = []),
        pic = 'http://www.gravatar.com/avatar/' +
              md5.hex_md5(id.trim().toLowerCase());

    client._deuxUserId = id;

    function fallbackMakeClient() {
      var poco = {
        displayName: name,
      };
      var rawClient = $rawclient.makeClientForNewIdentity(poco, db, null);
      client._rawClient = rawClient;
    };
    var db = makeDbConn('CLIENT:' + id);
    $Q.when($rawclient.getClientForExistingIdentityFromStorage(db, null),
      function(rawClient) {
        if (rawClient)
          client._rawClient = rawClient;
        else

md5

js function for hashing messages with MD5

BSD-3-Clause
Latest version published 4 years ago

Package Health Score

74 / 100
Full package analysis