- SEE ALSO
- REQUESTS AND BUGS
- COPYRIGHT AND LICENSE
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);
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.
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. 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% --
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.
You can also look for information at:
GitHub Source Repository
AnnoCPAN: Annotated CPAN documentation
RT: CPAN's request tracker
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>