Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Module dependencies.
*/

var md5 = require('md5');
var sha256 = require('js-sha256');
var jsonp = require('jsonp');
var querystring = require('querystring');

Expand All @@ -19,7 +19,7 @@ exports.url = function (email, config) {
config = config || {};
var qs = querystring.stringify(config);
var qs = qs === '' ? '' : '?' + qs;
var url = 'https://secure.gravatar.com/avatar/' + md5(email.trim().toLowerCase()) + qs;
var url = 'https://secure.gravatar.com/avatar/' + sha256(email.trim().toLowerCase()) + qs;
return url;
};

Expand All @@ -32,7 +32,7 @@ exports.url = function (email, config) {
*/

exports.profile = function (email, fn) {
var url = 'https://secure.gravatar.com/' + md5(email.trim().toLowerCase());
var url = 'https://secure.gravatar.com/' + sha256(email.trim().toLowerCase());
jsonp(url + '.json', function (err, obj) {
if (err) return fn(err);
if (obj && obj.entry) {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"description": "Simple browser implementation of the Gravatar API",
"version": "1.1.1",
"dependencies": {
"md5-component": "0.0.1",
"jsonp": "0.1.0",
"component-querystring": "1.3.2"
"component-querystring": "2.0.1",
"js-sha256": "0.9.0",
"jsonp": "0.1.0"
},
"browser": {
"md5": "md5-component",
Expand Down