use String::CRC32; ## you can use 64 bit as well, but then need to change pack/unpack functions ## May need to install from CPAN, but has installed on all systems I use my $keys = pack( "N N",length( $PublicKey ), length( $PrivateKey ) ) . $PublicKey . $PrivateKey; my $crc = crc32($keys); my $record = pack("N N", $crc , length($keys) ) . $keys;