Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

xor two hex strings js

function xor(hex1, hex2) {
  const buf1 = Buffer.from(hex1, 'hex');
  const buf2 = Buffer.from(hex2, 'hex');
  const bufResult = buf1.map((b, i) => b ^ buf2[i]);
  return bufResult.toString('hex');
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: How to fix prettier messing up your HTML on save 
Javascript :: java script return array 
Javascript :: how to receive form data in node js 
Javascript :: jquery try catch 
Javascript :: jquery loop through model list 
Javascript :: javascript tree search 
Javascript :: break and continue in javascript 
Javascript :: cookies javascript 
Javascript :: regexp object 
Javascript :: newtonsoft json parse string 
Javascript :: json stringify without quotes 
Javascript :: js DFS 
Javascript :: ~~ in js 
Javascript :: button prevent default 
Javascript :: for-in loop 
Javascript :: ajax post request 
Javascript :: zalgo text in javascript 
Javascript :: rem api rest 
Javascript :: javascript prevent more than one click 
Javascript :: clear input field react 
Javascript :: javascript Tagged Templates 
Javascript :: javascript Duplicating a parameter name is not allowed 
Javascript :: actionscript fibonacci fibonaccinumbers 
Javascript :: jquery v3.3.1 download 
Javascript :: manter alguns campos objetos javascript 
Javascript :: vuejs.org español 
Javascript :: phaser animation on complete event 
Javascript :: Pretty-Print JSON within Neovim 
Javascript :: using lambda for elasticache node.js 
Javascript :: javascript list all elements in set 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =