crypto: fix duplicate names.
This commit is contained in:
parent
ca48ab748f
commit
3d65488108
@ -35,7 +35,7 @@ exports.encipher = function encipher(data, key, iv) {
|
||||
* @returns {Buffer}
|
||||
*/
|
||||
|
||||
exports.decipher = function decipher(data, key, iv) {
|
||||
exports.decipher = function _decipher(data, key, iv) {
|
||||
let decipher = crypto.createDecipheriv('aes-256-cbc', key, iv);
|
||||
try {
|
||||
return util.concat(decipher.update(data), decipher.final());
|
||||
|
||||
@ -82,7 +82,7 @@ exports.hash256 = function hash256(data) {
|
||||
* @returns {Buffer} HMAC
|
||||
*/
|
||||
|
||||
exports.hmac = function hmac(alg, data, key) {
|
||||
exports.hmac = function _hmac(alg, data, key) {
|
||||
let hmac = crypto.createHmac(alg, key);
|
||||
return hmac.update(data).digest();
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user