skip-32

SKIP32 is a 80-bit key, 32-bit block symmetric cipher based on [Skipjack](http://en.wikipedia.org/wiki/Skipjack_%28cipher%29). It has the uncommon properties of being fast, creating very dissimilar encrypted values for consecutive input values, and produc

Usage no npm install needed!

<script type="module">
  import skip32 from 'https://cdn.skypack.dev/skip-32';
</script>

README

skip32

SKIP32 is a 80-bit key, 32-bit block symmetric cipher based on Skipjack. It has the uncommon properties of being fast, creating very dissimilar encrypted values for consecutive input values, and producing output of the same size as the input (32-bit). These make this cipher particularly useful for obfuscating series of 32-bit integers (e.g. auto-incremented database ids). It is probably not appropriate for general cryptography.

CF. http://search.cpan.org/~esh/Crypt-Skip32-0.17/lib/Crypt/Skip32.pm for more discussion.

Install

npm install skip-32

Example

var Skip32 = require("skip-32");
var cipher = new Skip32([0x1a, 0xcf, 0x24]);
var e = cipher.encrypt(1);
var d = cipher.decrypt(e);