Digest-Elf-1.42/000755 000765 000024 00000000000 12666624043 013665 5ustar00stevestaff000000 000000 Digest-Elf-1.42/Changes000644 000765 000024 00000001000 12666623701 015147 0ustar00stevestaff000000 000000 Revision history for Perl extension Digest::Elf. 1.42 Mon Feb 29 2016 - Catch yester-reality up to the reality passing my window today. - Fix marny spuylling earors. - Add license info. // Shhh, this is the only material change. - 1."Answer to the Ultimate Question of Life, the Universe, and Everything" 0.02 Tues May 14 2002 - Compose pod and README. - Renamed 'hash' method to 'elf'. 0.01 Sun Apr 21 22:22:31 2002 - original version; created by h2xs 1.21 with options -A -n Digest::Elf Digest-Elf-1.42/Elf.pm000644 000765 000024 00000002347 12666623457 014747 0ustar00stevestaff000000 000000 package Digest::Elf; use 5.006; use strict; use warnings; use vars qw( $VERSION ); require Exporter; require DynaLoader; our @ISA = qw(Exporter DynaLoader); # Items to export into callers namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. # This allows declaration use Digest::Elf ':all'; # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK # will save memory. our %EXPORT_TAGS = ( 'all' => [ qw( elf ) ] ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); our @EXPORT = qw( ); $VERSION = sprintf( "%s", q{$Id: Elf.pm,v 1.42 2016/03/05 04:18:47 steve Exp $} =~ /(\d+\.\d+)/ ); bootstrap Digest::Elf $VERSION; # Preloaded methods go here. 1; __END__ =head1 NAME Digest::Elf - Perl extension for generating ElfHash values. =head1 SYNOPSIS use Digest::Elf; print Digest::Elf::elf( "foo" ); =head1 DESCRIPTION Digest::Elf is an implementation of the ElfHash algorithm. =head1 FUNCTIONS =over =item elf( VALUE ) Create a hash value based on the input value. =back =head1 AUTHOR Steve McKay, Esteve@colgreen.comE =head1 SEE ALSO =over =item Digest::MD5 =back =cut Digest-Elf-1.42/Elf.xs000644 000765 000024 00000000657 07470565143 014761 0ustar00stevestaff000000 000000 #include "EXTERN.h" #include "perl.h" #include "XSUB.h" // $VERSION = sprintf( "%s", q{$Id: Elf.xs,v 1.4 2002/05/15 23:08:19 steve Exp $} =~ /(\d+\.\d+)/ ); MODULE = Digest::Elf PACKAGE = Digest::Elf unsigned long elf ( sval ) char * sval; CODE: unsigned long h = 0, g; while ( *sval ) { h = ( h << 4 ) + *sval++; if ( g = h & 0xF0000000 ) h ^= g >> 24; h &= ~g; } RETVAL = h; OUTPUT: RETVAL Digest-Elf-1.42/LICENSE000644 000765 000024 00000002067 12665204535 014676 0ustar00stevestaff000000 000000 The MIT License (MIT) Copyright (c) 2002 Steve McKay Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Digest-Elf-1.42/Makefile.PL000644 000765 000024 00000001507 07460721772 015645 0ustar00stevestaff000000 000000 use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( 'NAME' => 'Digest::Elf', 'VERSION_FROM' => 'Elf.pm', # finds $VERSION 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1 ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (ABSTRACT_FROM => 'Elf.pm', # retrieve abstract from module AUTHOR => 'A. U. Thor ') : ()), 'LIBS' => [''], # e.g., '-lm' 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING' # Insert -I. if you add *.h files later: 'INC' => '', # e.g., '-I/usr/include/other' 'dist' => { COMPRESS=>"gzip", SUFFIX=>"gz" }, # Un-comment this if you add C files to link with later: # 'OBJECT' => '$(O_FILES)', # link all the C files too ); Digest-Elf-1.42/MANIFEST000644 000765 000024 00000000352 12666624043 015016 0ustar00stevestaff000000 000000 Changes Elf.pm Elf.xs LICENSE Makefile.PL MANIFEST README test.pl META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) Digest-Elf-1.42/META.json000644 000765 000024 00000001536 12666624043 015313 0ustar00stevestaff000000 000000 { "abstract" : "Perl extension for generating ElfHash values.", "author" : [ "A. U. Thor " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.133380", "license" : [ "unknown" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Digest-Elf", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : {} } }, "release_status" : "stable", "version" : "1.42" } Digest-Elf-1.42/META.yml000644 000765 000024 00000000770 12666624043 015142 0ustar00stevestaff000000 000000 --- abstract: 'Perl extension for generating ElfHash values.' author: - 'A. U. Thor ' build_requires: ExtUtils::MakeMaker: 0 configure_requires: ExtUtils::MakeMaker: 0 dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.133380' license: unknown meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Digest-Elf no_index: directory: - t - inc requires: {} version: 1.42 Digest-Elf-1.42/README000644 000765 000024 00000001225 12666624012 014541 0ustar00stevestaff000000 000000 Digest::Elf version 1.42 ======================= Digest::Elf provides an XS based implementation of the ElfHash algorithm. What's that get ya? ElfHash generates reasonably unique 32 bit integer value from a string in a reasonably short period of time. The actual algorithm was culled from a Dr. Dobbs Journal article and they culled it, I think, from the source for the GNU c complier. If you know better, please let me know. INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEPENDENCIES This module requires a fully operational battle station, and a working install of the gnu c compiler. Digest-Elf-1.42/test.pl000644 000765 000024 00000001031 12665206567 015202 0ustar00stevestaff000000 000000 # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl test.pl' ######################### # change 'tests => 1' to 'tests => last_test_to_print'; use Test; BEGIN { plan tests => 2 }; use Digest::Elf qw( elf ); ok(1); # If we made it this far, we're ok. ######################### # Insert your test code below, the Test module is use()ed here so read # its man page ( perldoc Test ) for help writing this test script. ok( elf( "foobar" ) == 114710658 );