Skip to content

Commit

Permalink
adjust buffer encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce17 committed Nov 16, 2017
1 parent 63f5c8e commit 3062ea3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ var nativeTimingSafeEqual = function nativeTimingSafeEqual(a, b) {

var len = Math.max(strA.length, strB.length);

var bufA = bufferAlloc(len, strA, 'utf-8');
var bufB = bufferAlloc(len, strB, 'utf-8');
var bufA = bufferAlloc(len, strA, 'binary');
var bufB = bufferAlloc(len, strB, 'binary');

return crypto.timingSafeEqual(bufA, bufB);
};
Expand Down

0 comments on commit 3062ea3

Please sign in to comment.