[][src]Crate skip32

SKIP32 is a 80-bit key, 32-bit block 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 not appropriate for general cryptography.

See CPAN - Crypt::Skip32 for more information.

Example

let key: &[u8; 10] = &[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
let input = 1000;
let encoded = skip32::encode(key, input);
let decoded = skip32::decode(key, encoded);
assert!(encoded == 2109307140);
assert!(decoded == input);

Functions

decode

Decode

encode

Encode