Skip to content

Instantly share code, notes, and snippets.

@yeyus
Created July 24, 2015 22:59
Show Gist options
  • Save yeyus/14e72b58311838b82439 to your computer and use it in GitHub Desktop.
Save yeyus/14e72b58311838b82439 to your computer and use it in GitHub Desktop.
Checksum algorithm for PRO-652/PRO-197 scanners
toHash = function(d) { return (parseInt("FFFF", 16) - d.split(" ").map(function(e) { return parseInt(e, 16); }).reduce(function(p,n) {return p + n})).toString(16); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment