Crypt::Skip32::XS - Drop-in replacement for Crypt::Skip32
use Crypt::Skip32::XS; $cipher = Crypt::Skip32::XS->new($key); $ciphertext = $cipher->encrypt($plaintext); $plaintext = $cipher->decrypt($ciphertext);
The Crypt::Skip32::XS module is similar in function to Crypt::Skip32, but is substantially faster as it is written in C/XS instead of pure Perl.
Crypt::Skip32::XS
Crypt::Skip32
NOTE: As of version 0.10, Crypt::Skip32 automatically uses this module if it is installed.
$cipher = Crypt::Skip32::XS->new($key);
Creates a new Crypt::Skip32::XS cipher object with the given key. The key must be 10 bytes long.
$ciphertext = $cipher->encrypt($plaintext);
Encrypts plaintext and returns the ciphertext. The plaintext must be of 4 bytes long.
$plaintext = $cipher->decrypt($ciphertext);
Decrypts ciphertext and returns the plaintext. The ciphertext must be 4 bytes long.
$blocksize = $cipher->blocksize; $blocksize = Crypt::Skip32::XS->blocksize;
Returns the size (in bytes) of the block cipher, which is always 4.
$keysize = $cipher->keysize; $keysize = Crypt::Skip32::XS->keysize;
Returns the size (in bytes) of the key, which is always 10.
This distribution contains a benchmarking script which compares Crypt::Skip32::XS with Crypt::Skip32. These are the results on a MacBook 2GHz with Perl 5.8.8:
Benchmark: running perl, xs for at least 1 CPU seconds... perl: 1 wallclock secs ( 1.07 usr + 0.01 sys = 1.08 CPU) @ 3555.56/s (n=3840) xs: 1 wallclock secs ( 1.08 usr + 0.01 sys = 1.09 CPU) @ 263044.95/s (n=286719) Rate perl xs perl 3542/s -- -99% xs 263474/s 7339% --
http://en.wikipedia.org/wiki/Skipjack_(cipher)
Please report any bugs or feature requests to http://rt.cpan.org/Public/Bug/Report.html?Queue=Crypt-Skip32-XS. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Crypt::Skip32::XS
You can also look for information at:
GitHub Source Repository
http://github.com/gray/crypt-skip32-xs
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Crypt-Skip32-XS
CPAN Ratings
http://cpanratings.perl.org/d/Crypt-Skip32-XS
RT: CPAN's request tracker
http://rt.cpan.org/Public/Dist/Display.html?Name=Crypt-Skip32-XS
Search CPAN
http://search.cpan.org/dist/Crypt-Skip32-XS/
Copyright (C) 2008-2009 gray <gray at cpan.org>, all rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
gray, <gray at cpan.org>
To install Crypt::Skip32::XS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Crypt::Skip32::XS
CPAN shell
perl -MCPAN -e shell install Crypt::Skip32::XS
For more information on module installation, please visit the detailed CPAN module installation guide.