Skip to content

Commit 1fb0471

Browse files
authored
Merge pull request #13 from aptoma/bump-deps-remove-crypto
Update deps, remove crypto lib
2 parents edfaae6 + 18dbb29 commit 1fb0471

File tree

4 files changed

+5232
-2562
lines changed

4 files changed

+5232
-2562
lines changed

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
16
1+
20
22

lib/index.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
const qs = require('qs');
4-
const hmacSHA256 = require('crypto-js/hmac-sha256');
4+
const crypto = require('crypto');
55

66
const cropper = require('./crop');
77

@@ -47,7 +47,9 @@ exports.getResizedImageUrl = (imageUrl, targetSize, actions, transformToken, par
4747
}
4848

4949
function createSignature(key, url) {
50-
return hmacSHA256(url, key);
50+
return crypto.createHmac('sha256', key)
51+
.update(url)
52+
.digest('hex');
5153
}
5254
}
5355
};

0 commit comments

Comments
 (0)