hashes
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 763
hash.c 2
hash.c is a C hash table with quadratic probing. more>>
hash.c is a C hash table with quadratic probing. hash.c is very small and easy to use.
Compile: gcc -c hash.c
This hashtable uses C-strings for keys and quadratic probing instead of linked-list chains. It depends only on ANSI C and so should work anywhere.
API
hash * hash_new ( unsigned int size ) Create new hashtable.
void hash_destroy ( hash *h ) Free hashtable.
int hash_add ( hash *h , const char *key , void *value ) Add key/value pair.
void * hash_get ( hash *h , const char *key ) Return value matching given key.
void * hash_remove ( hash *h , const char *key ) Remove key from table, returing value.
unsigned int hash_size ( hash *h ) Returns total number of keys.
Enhancements:
- This release uses exponentiation instead of xor in hashing.
- It adds a hash_destroy function.
<<lessCompile: gcc -c hash.c
This hashtable uses C-strings for keys and quadratic probing instead of linked-list chains. It depends only on ANSI C and so should work anywhere.
API
hash * hash_new ( unsigned int size ) Create new hashtable.
void hash_destroy ( hash *h ) Free hashtable.
int hash_add ( hash *h , const char *key , void *value ) Add key/value pair.
void * hash_get ( hash *h , const char *key ) Return value matching given key.
void * hash_remove ( hash *h , const char *key ) Remove key from table, returing value.
unsigned int hash_size ( hash *h ) Returns total number of keys.
Enhancements:
- This release uses exponentiation instead of xor in hashing.
- It adds a hash_destroy function.
Download (0.004MB)
Added: 2006-09-22 License: BSD License Price:
1188 downloads
Hash::Type 1.05
Hash::Type module contains pseudo-hashes as arrays tied to a type (list of fields). more>>
Hash::Type module contains pseudo-hashes as arrays tied to a "type" (list of fields).
SYNOPSIS
use Hash::Type;
# create a Hash::Type
my $personType = new Hash::Type(qw(firstname lastname city));
# create and populate some hashes tied to $personType
tie %wolfgang, $personType, "wolfgang amadeus", "mozart", "salzburg";
$ludwig = new $personType ("ludwig", "van beethoven", "vienna");
$jsb = new $personType;
$jsb->{city} = "leipzig";
@{$jsb}{qw(firstname lastname)} = ("johann sebastian", "bach");
# add fields dynamically
$personType->add("birth", "death") or die "fields not added";
$wolfgang{birth} = 1750;
# More complete example : read a flat file with headers on first line
my ($headerline, @datalines) = map {chomp; $_} ;
my $ht = new Hash::Type(split /t/, $headerline);
foreach my $line (@datalines) {
my $data = new $ht(split /t/, $line);
work_with($data->{someField}, $data->{someOtherField});
}
# an alternative to Time::gmtime and Time::localtime
my $timeType = new Hash::Type qw(sec min hour mday mon year wday yday);
my $localtime = new $timeType (localtime);
my $gmtime = new $timeType (gmtime);
print $localtime->{hour} - $gmtime->{hour}, " hours difference to GMT";
# comparison functions
my $byAge = $personType->cmp("birth : -num, lastname, firstname");
my $byNameLength = $personType->cmp(lastname => {length($b) length($a)},
lastname => alpha,
firstname => alpha);
showPerson($_) foreach (sort $byAge @people);
showPerson($_) foreach (sort $byNameLength @people);
# special comparisons : dates
my $US_DateCmp = $myHashType->cmp("someDateField : m/d/y");
my $FR_InverseDateCmp = $myHashType->cmp("someDateField : -d.m.y");
<<lessSYNOPSIS
use Hash::Type;
# create a Hash::Type
my $personType = new Hash::Type(qw(firstname lastname city));
# create and populate some hashes tied to $personType
tie %wolfgang, $personType, "wolfgang amadeus", "mozart", "salzburg";
$ludwig = new $personType ("ludwig", "van beethoven", "vienna");
$jsb = new $personType;
$jsb->{city} = "leipzig";
@{$jsb}{qw(firstname lastname)} = ("johann sebastian", "bach");
# add fields dynamically
$personType->add("birth", "death") or die "fields not added";
$wolfgang{birth} = 1750;
# More complete example : read a flat file with headers on first line
my ($headerline, @datalines) = map {chomp; $_} ;
my $ht = new Hash::Type(split /t/, $headerline);
foreach my $line (@datalines) {
my $data = new $ht(split /t/, $line);
work_with($data->{someField}, $data->{someOtherField});
}
# an alternative to Time::gmtime and Time::localtime
my $timeType = new Hash::Type qw(sec min hour mday mon year wday yday);
my $localtime = new $timeType (localtime);
my $gmtime = new $timeType (gmtime);
print $localtime->{hour} - $gmtime->{hour}, " hours difference to GMT";
# comparison functions
my $byAge = $personType->cmp("birth : -num, lastname, firstname");
my $byNameLength = $personType->cmp(lastname => {length($b) length($a)},
lastname => alpha,
firstname => alpha);
showPerson($_) foreach (sort $byAge @people);
showPerson($_) foreach (sort $byNameLength @people);
# special comparisons : dates
my $US_DateCmp = $myHashType->cmp("someDateField : m/d/y");
my $FR_InverseDateCmp = $myHashType->cmp("someDateField : -d.m.y");
Download (0.008MB)
Added: 2007-08-06 License: Perl Artistic License Price:
813 downloads
Hash::Merge 0.10
Hash::Merge Perl module merges arbitrarily deep hashes into a single hash. more>>
Hash::Merge Perl module merges arbitrarily deep hashes into a single hash.
SYNOPSIS
use Hash::Merge qw( merge );
my %a = (
foo => 1,
bar => [ qw( a b e ) ],
querty => { bob => alice },
);
my %b = (
foo => 2,
bar => [ qw(c d) ],
querty => { ted => margeret },
);
my %c = %{ merge( %a, %b ) };
Hash::Merge::set_behavior( RIGHT_PRECEDENT );
# This is the same as above
Hash::Merge::specify_behavior(
{
SCALAR => {
SCALAR => sub { $_[1] },
ARRAY => sub { [ $_[0], @{$_[1]} ] },
HASH => sub { $_[1] },
},
ARRAY => {
SCALAR => sub { $_[1] },
ARRAY => sub { [ @{$_[0]}, @{$_[1]} ] },
HASH => sub { $_[1] },
},
HASH => {
SCALAR => sub { $_[1] },
ARRAY => sub { [ values %{$_[0]}, @{$_[1]} ] },
HASH => sub { Hash::Merge::_merge_hashes( $_[0], $_[1] ) },
},
},
My Behavior,
);
<<lessSYNOPSIS
use Hash::Merge qw( merge );
my %a = (
foo => 1,
bar => [ qw( a b e ) ],
querty => { bob => alice },
);
my %b = (
foo => 2,
bar => [ qw(c d) ],
querty => { ted => margeret },
);
my %c = %{ merge( %a, %b ) };
Hash::Merge::set_behavior( RIGHT_PRECEDENT );
# This is the same as above
Hash::Merge::specify_behavior(
{
SCALAR => {
SCALAR => sub { $_[1] },
ARRAY => sub { [ $_[0], @{$_[1]} ] },
HASH => sub { $_[1] },
},
ARRAY => {
SCALAR => sub { $_[1] },
ARRAY => sub { [ @{$_[0]}, @{$_[1]} ] },
HASH => sub { $_[1] },
},
HASH => {
SCALAR => sub { $_[1] },
ARRAY => sub { [ values %{$_[0]}, @{$_[1]} ] },
HASH => sub { Hash::Merge::_merge_hashes( $_[0], $_[1] ) },
},
},
My Behavior,
);
Download (0.007MB)
Added: 2007-06-28 License: Perl Artistic License Price:
851 downloads
Hash::Case 1.003
Hash::Case is a base class for hashes with key-casing requirements. more>>
CLASS HIERARCHY
Hash::Case
is a Tie::StdHash
is a Tie::Hash
SYNOPSIS
use Hash::Case::Lower;
tie my(%lchash), Hash::Case::Lower;
$lchash{StraNGeKeY} = 3;
print keys %lchash; # strangekey
Hash::Case is the base class for various classes which tie special treatment for the casing of keys. Be aware of the differences in implementation: Lower and Upper are tied native hashes: these hashes have no need for hidden fields or other assisting data structured. A case Preserve hash will actually create three hashes.
The following strategies are implemented:
Hash::Case::Lower (native hash)
Keys are always considered lower case. The internals of this module translate any incoming key to lower case before it is used.
Hash::Case::Upper (native hash)
Like the ::Lower, but then all keys are always translated into upper case. This module can be of use for some databases, which do translate everything to capitals as well. To avoid confusion, you may want to have you own internal Perl hash do this as well.
Hash::Case::Preserve
The actual casing is ignored, but not forgotten.
METHODS
tie HASH, TIE, [VALUES,] OPTIONS
Tie the HASH with the TIE package which extends Hash::Case. The OPTIONS differ per implementation: read the manual page for the package you actually use. The VALUES is a reference to an array containing key-value pairs, or a reference to a hash: they fill the initial hash.
Examples:
my %x;
tie %x, Hash::Case::Lower;
$x{Upper} = 3;
print keys %x; # upper
my @y = (ABC => 3, DeF => 4);
tie %x, Hash::Case::Lower, @y;
print keys %x; # abc def
my %z = (ABC => 3, DeF => 4);
tie %x, Hash::Case::Lower, %z;
addPairs PAIRS
Specify an even length list of alternating key and value to be stored in the hash.
addHashData HASH
Add the data of a hash (passed as reference) to the created tied hash. The existing values in the hash remain, the keys are adapted to the needs of the the casing.
setHash HASH
The functionality differs for native and wrapper hashes. For native hashes, this is the same as first clearing the hash, and then a call to addHashData. Wrapper hashes will use the hash you specify here to store the data, and re-create the mapping hash.
Download (0.005MB)
Added: 2007-05-18 License: Perl Artistic License Price:
891 downloads
UnHash 0.6
UnHash is a program that tries to find a collision in a given hash. more>>
UnHash project is a program that tries to find a collision in a given hash. The hash can be either MD5 or SHA1, and the program will auto-detect which one is given.
To see usage just run it without any arguments.
The idea to write such a program came to me when I was playing the NGSEC (www.ngsec.com) games. Some levels required to find the original username/password string from SHA1 and MD5 hashes of them. There existed
an MD5 cracker already, but nothing for SHA1. So, while I was writing one
from rfc code it seemed like a good idea to put both crackers into one.
I also noticed that the MD5 cracker used OpenSSLs libs so I also added support for openssl, which is much faster than rfcs. OpenSSL support will compile by default unless you uncomment the define for rfc in config.h.
<<lessTo see usage just run it without any arguments.
The idea to write such a program came to me when I was playing the NGSEC (www.ngsec.com) games. Some levels required to find the original username/password string from SHA1 and MD5 hashes of them. There existed
an MD5 cracker already, but nothing for SHA1. So, while I was writing one
from rfc code it seemed like a good idea to put both crackers into one.
I also noticed that the MD5 cracker used OpenSSLs libs so I also added support for openssl, which is much faster than rfcs. OpenSSL support will compile by default unless you uncomment the define for rfc in config.h.
Download (0.022MB)
Added: 2007-02-17 License: GPL (GNU General Public License) Price:
1007 downloads
phpass 0.1
phpass is a portable PHP password hashing framework. more>>
phpass is a portable PHP password hashing framework.
This is a portable public domain password hashing framework for use in PHP applications. It is meant to work with PHP 3 and above, and it has actually been tested with PHP 3.0.18, 4.3.x, 4.4.x, and 5.0.x so far.
The preferred (most secure) hashing method supported by phpass is the OpenBSD-style Blowfish-based bcrypt, also supported with our public domain crypt_blowfish package (for C applications), and known in PHP as CRYPT_BLOWFISH, with a fallback to BSDI-style extended DES-based hashes, known in PHP as CRYPT_EXT_DES, and a last resort fallback to an MD5-based variable iteration count password hashing method implemented in phpass itself.
To ensure that the fallbacks will never occur, the PHP Hardening-Patch may be used. The Hardening-Patch integrates crypt_blowfish into the PHP interpreter such that bcrypt is available for use by PHP scripts even if the host system lacks support for it. Hopefully, future versions of PHP will do the same.
Included in the package are a PHP source file implementing the PasswordHash PHP class, a tiny PHP application demonstrating the use of the PasswordHash class, and a C re-implementation of the last resort password hashing method (used for testing the correctness of the primary implementation only).
Enhancements:
- The framework test program has been enhanced in numerous ways, and a minor bug which had no practical impact in the framework itself has been fixed.
<<lessThis is a portable public domain password hashing framework for use in PHP applications. It is meant to work with PHP 3 and above, and it has actually been tested with PHP 3.0.18, 4.3.x, 4.4.x, and 5.0.x so far.
The preferred (most secure) hashing method supported by phpass is the OpenBSD-style Blowfish-based bcrypt, also supported with our public domain crypt_blowfish package (for C applications), and known in PHP as CRYPT_BLOWFISH, with a fallback to BSDI-style extended DES-based hashes, known in PHP as CRYPT_EXT_DES, and a last resort fallback to an MD5-based variable iteration count password hashing method implemented in phpass itself.
To ensure that the fallbacks will never occur, the PHP Hardening-Patch may be used. The Hardening-Patch integrates crypt_blowfish into the PHP interpreter such that bcrypt is available for use by PHP scripts even if the host system lacks support for it. Hopefully, future versions of PHP will do the same.
Included in the package are a PHP source file implementing the PasswordHash PHP class, a tiny PHP application demonstrating the use of the PasswordHash class, and a C re-implementation of the last resort password hashing method (used for testing the correctness of the primary implementation only).
Enhancements:
- The framework test program has been enhanced in numerous ways, and a minor bug which had no practical impact in the framework itself has been fixed.
Download (0.004MB)
Added: 2006-09-08 License: GPL (GNU General Public License) Price:
1144 downloads
fb_shash 1.0
fb_shash is a UDF library for Firebird/Interbase. more>>
fb_shash is a UDF library for Firebird/Interbase. It implements hash and hmac interfaces to the openssl library.
It supports hash and hmac algorithms such as SHA1 and MD5. fb_shash supports BLOB data.
<<lessIt supports hash and hmac algorithms such as SHA1 and MD5. fb_shash supports BLOB data.
Download (0.56MB)
Added: 2006-10-30 License: GPL (GNU General Public License) Price:
1090 downloads
Set::Hash 0.01
Set::Hash is a Perl module with hashes as objects with lots of handy methods and support for method chaining. more>>
Set::Hash is a Perl module with hashes as objects with lots of handy methods (including set comparisons) and support for method chaining.
SYNOPSIS
use Set::Hash;
my $sh1 = Set::Hash->new(name=>"dan",age=>33);
my $sh2 = Set::Hash->new(qw/weight 185 height 72/);
$sh1->length->print; # 2
$sh1->push($sh2); # $sh1 now has weight=>185 and height=>72
$sh1->length->print; # 4
$sh2->values->join(",")->print(1); # 185, 72
Set::Hash allows you to create strings as objects and use OO-style methods on them. Many convenient methods are provided here that appear in the FAQs, the Perl Cookbook or posts from comp.lang.perl.misc. In addition, there are Set methods with corresponding (overloaded) operators for the purpose of Set comparison, i.e. +, ==, etc.
The purpose is to provide built-in methods for operations that people are always asking how to do, and which already exist in languages like Ruby. This should (hopefully) improve code readability and/or maintainability. The other advantage to this module is method-chaining by which any number of methods may be called on a single object in a single statement.
Note that Set::Hash is a subclass of Set::Array, although most of the methods of Set::Array have been overloaded, so youll want to check the documentation for what each method does exactly.
<<lessSYNOPSIS
use Set::Hash;
my $sh1 = Set::Hash->new(name=>"dan",age=>33);
my $sh2 = Set::Hash->new(qw/weight 185 height 72/);
$sh1->length->print; # 2
$sh1->push($sh2); # $sh1 now has weight=>185 and height=>72
$sh1->length->print; # 4
$sh2->values->join(",")->print(1); # 185, 72
Set::Hash allows you to create strings as objects and use OO-style methods on them. Many convenient methods are provided here that appear in the FAQs, the Perl Cookbook or posts from comp.lang.perl.misc. In addition, there are Set methods with corresponding (overloaded) operators for the purpose of Set comparison, i.e. +, ==, etc.
The purpose is to provide built-in methods for operations that people are always asking how to do, and which already exist in languages like Ruby. This should (hopefully) improve code readability and/or maintainability. The other advantage to this module is method-chaining by which any number of methods may be called on a single object in a single statement.
Note that Set::Hash is a subclass of Set::Array, although most of the methods of Set::Array have been overloaded, so youll want to check the documentation for what each method does exactly.
Download (0.007MB)
Added: 2006-12-18 License: Perl Artistic License Price:
1040 downloads
Tie::Hash::KeysMask 0.01
Tie::Hash::KeysMask - control key aliasing by mask function, e.g. omit case of character distinction. more>>
Tie::Hash::KeysMask - control key aliasing by mask function, e.g. omit case of character distinction.
SYNOPSIS
use Tie::Hash::KeysMask;
my $mask = sub {...};
tie %argH, Tie::Hash::KeyMask,$mask, more arguments;
Yield that the key mask function &$mask translates any key
when applied to %argH like ..
$k => $mask->($k, more arguments)
that is
$argH{$k} expands to $argH{$mask->($k, more arguments)}
$argH{$k} = $v expands to $argH{$mask->($k, more arguments)} = $v
If e.g. choose key mask sub {uc $_[0]} one can access an element without care of case of the key. In place of sub { } particular items can be used which will be translated into a CODE. The translation is
lc => sub { lc $_[0] }
uc => sub { uc $_[0] }
%M => sub { exists $M{$_[0]} ? $M{$_[0]} : $_[0]}
A class-method codemap manage this translation. If it is pleased one could override it and add ones own translations.
This class inherits from Tie::Hash::Create by which the tied hash can be obtained anonymously as reference with the command
Tie::Hash::KeyMask->newHASH (sub {...}, more arguments)
which overrides the tie syntax calling tie from body of newHash.
<<lessSYNOPSIS
use Tie::Hash::KeysMask;
my $mask = sub {...};
tie %argH, Tie::Hash::KeyMask,$mask, more arguments;
Yield that the key mask function &$mask translates any key
when applied to %argH like ..
$k => $mask->($k, more arguments)
that is
$argH{$k} expands to $argH{$mask->($k, more arguments)}
$argH{$k} = $v expands to $argH{$mask->($k, more arguments)} = $v
If e.g. choose key mask sub {uc $_[0]} one can access an element without care of case of the key. In place of sub { } particular items can be used which will be translated into a CODE. The translation is
lc => sub { lc $_[0] }
uc => sub { uc $_[0] }
%M => sub { exists $M{$_[0]} ? $M{$_[0]} : $_[0]}
A class-method codemap manage this translation. If it is pleased one could override it and add ones own translations.
This class inherits from Tie::Hash::Create by which the tied hash can be obtained anonymously as reference with the command
Tie::Hash::KeyMask->newHASH (sub {...}, more arguments)
which overrides the tie syntax calling tie from body of newHash.
Download (0.004MB)
Added: 2007-08-10 License: Perl Artistic License Price:
807 downloads
Tie::Hash::Stack 0.09
Tie::Hash::Stack is a Perl module which maintains an array of hashes like a stack. more>>
Tie::Hash::Stack is a Perl module which maintains an array of hashes like a stack.
SYNOPSIS
use Tie::Hash::Stack qw(pop_hash push_hash merge_hash);
my %hash;
tie( %hash, "Tie::Hash::Stack" ); # Ties the hash
$hash{ 1 } = "one";
$hash{ 2 } = "two";
$hash{ 3 } = "three";
push_hash %hash; # Pushes a new hash on the stack
$hash{ 2 } = "II"; # $hash{ 2 } now II
$hash{ 4 } = "IV";
push_hash %hash;
$hash{ 3 } = "9/3"; # $hash{ 3 } now 9/3
$hash{ 5 } = "10/2";
pop_hash %hash; # $hash{ 3 } now three;
delete $hash{ 2 }; # $hash{ 2 } now undefed;
my %merged = merge_hash %hash; # ( 1=>one, 3=>three, 4=>IV )
Tie::Hash::Stack allows one to tie a hash to a data structure that is composed of an ordered (FILO) sequence of hashes; hash values are always set on the newest hash of the stack, and are retrieved from the hash that contains the requested that is newest on the stack. The stack can be manipulated to add or remove these hashes. This type of structure is good when one is collecting data in stages with the possibility of having to "back up" to previous stages.
<<lessSYNOPSIS
use Tie::Hash::Stack qw(pop_hash push_hash merge_hash);
my %hash;
tie( %hash, "Tie::Hash::Stack" ); # Ties the hash
$hash{ 1 } = "one";
$hash{ 2 } = "two";
$hash{ 3 } = "three";
push_hash %hash; # Pushes a new hash on the stack
$hash{ 2 } = "II"; # $hash{ 2 } now II
$hash{ 4 } = "IV";
push_hash %hash;
$hash{ 3 } = "9/3"; # $hash{ 3 } now 9/3
$hash{ 5 } = "10/2";
pop_hash %hash; # $hash{ 3 } now three;
delete $hash{ 2 }; # $hash{ 2 } now undefed;
my %merged = merge_hash %hash; # ( 1=>one, 3=>three, 4=>IV )
Tie::Hash::Stack allows one to tie a hash to a data structure that is composed of an ordered (FILO) sequence of hashes; hash values are always set on the newest hash of the stack, and are retrieved from the hash that contains the requested that is newest on the stack. The stack can be manipulated to add or remove these hashes. This type of structure is good when one is collecting data in stages with the possibility of having to "back up" to previous stages.
Download (0.006MB)
Added: 2007-02-15 License: Perl Artistic License Price:
982 downloads
Tie::Hash::Sorted 0.10
Tie::Hash::Sorted Perl module presents hashes in sorted order. more>>
Tie::Hash::Sorted Perl module presents hashes in sorted order.
SYNOPSIS
use Tie::Hash::Sorted;
my %ages = (
John => 33,
Jacob => 29,
Jingle => 15,
Heimer => 48,
Smitz => 12,
);
my $sort_by_numeric_value = sub {
my $hash = shift;
[ sort {$hash->{$b} $hash->{$a}} keys %$hash ];
};
tie my %sorted_ages, Tie::Hash::Sorted,
Hash => %ages,
Sort_Routine => $sort_by_numeric_value;
for my $name ( keys %sorted_ages ) {
print "$name is $sorted_ages{$name} years old.n";
}
### OUTPUT ###
Heimer is 48 ears old.
John is 33 ears old.
Jacob is 29 ears old.
Jingle is 15 ears old.
Smitz is 12 ears old.
<<lessSYNOPSIS
use Tie::Hash::Sorted;
my %ages = (
John => 33,
Jacob => 29,
Jingle => 15,
Heimer => 48,
Smitz => 12,
);
my $sort_by_numeric_value = sub {
my $hash = shift;
[ sort {$hash->{$b} $hash->{$a}} keys %$hash ];
};
tie my %sorted_ages, Tie::Hash::Sorted,
Hash => %ages,
Sort_Routine => $sort_by_numeric_value;
for my $name ( keys %sorted_ages ) {
print "$name is $sorted_ages{$name} years old.n";
}
### OUTPUT ###
Heimer is 48 ears old.
John is 33 ears old.
Jacob is 29 ears old.
Jingle is 15 ears old.
Smitz is 12 ears old.
Download (0.008MB)
Added: 2007-07-13 License: Perl Artistic License Price:
833 downloads
Classless.Hasher 0.7
Hasher is a tool to help programmers implement standard hashing and checksum algorithms into their own software. more>>
Hasher is a tool to help programmers implement checksum algorithms and standard hashing into their own software.
Written entirely in C# and designed for use in the .NET Framework, Hasher providers a uniform interface to easily use any of the algorithms contained within this library in other programs.
Hasher is planned to encapsulate a wide variety of cryptographic hashing and checksum algorithms.
Focusing on compatibility, speed, and ease-of-use, Classless.Hasher currently supports over 25 different algorithms including the "basics" such as CRC, MD5, and SHA, as well as others like HAVAL, Tiger, Snefru, and Whirlpool.
Enhancements:
- Hasher rises from the dead!
- Fixed CRCStandards for CRC8 and CRC32.
- Fixed CRC handling when the Order was 64bits.
- Removed the REVERSED CRCStandards.
- Added CRCStandards for CRC64_ISO and CRC64_ECMA.
- Changed CRCStandard CRC16 to CRC16_IBM.
- Renamed CRC16_CCITT_REVERSED to CRC16_XMODEM.
- Fixed nasty bug that broke MD4, MD5, the RIPEMDs, Tiger, and the SHAs when large datasets were processed.
- Added support for creating Panama hashes.
- Fixed the NAnt build script to better support Mono and .NET v2.0.
<<lessWritten entirely in C# and designed for use in the .NET Framework, Hasher providers a uniform interface to easily use any of the algorithms contained within this library in other programs.
Hasher is planned to encapsulate a wide variety of cryptographic hashing and checksum algorithms.
Focusing on compatibility, speed, and ease-of-use, Classless.Hasher currently supports over 25 different algorithms including the "basics" such as CRC, MD5, and SHA, as well as others like HAVAL, Tiger, Snefru, and Whirlpool.
Enhancements:
- Hasher rises from the dead!
- Fixed CRCStandards for CRC8 and CRC32.
- Fixed CRC handling when the Order was 64bits.
- Removed the REVERSED CRCStandards.
- Added CRCStandards for CRC64_ISO and CRC64_ECMA.
- Changed CRCStandard CRC16 to CRC16_IBM.
- Renamed CRC16_CCITT_REVERSED to CRC16_XMODEM.
- Fixed nasty bug that broke MD4, MD5, the RIPEMDs, Tiger, and the SHAs when large datasets were processed.
- Added support for creating Panama hashes.
- Fixed the NAnt build script to better support Mono and .NET v2.0.
Download (0.63MB)
Added: 2006-02-27 License: MPL (Mozilla Public License) Price:
1335 downloads
Hash::Diff::Dispatch 0.01
Hash::Diff::Dispatch allows to execute code depending on difference between hashes. more>>
Hash::Diff::Dispatch allows to execute code depending on difference between hashes.
SYNOPSIS
my $hash_watcher = Hash::Diff::Dispatch->new(
{}, # Sets the starting hash
# The events will be called using the order returned
# by calling keys on these values...
b => &bold,
i => &italic,
);
# Will call: bold(on, 5)
$hash_watcher->update( { b => 5, a => la } );
# Will call: bold(changed, 6)
$hash_watcher->update( { b => 6 } );
# Will call: bold(changed, 0)
$hash_watcher->update( { b => 0 } );
# Will call: bold(off)
$hash_watcher->update( {} );
METHODS
new
Accepts a starting hash-ref, and then a list of keys you want to watch, and the code to execute when they change. It will take a copy of the hash in the hash-ref you specify.
update
Accepts a hash-ref, which itll take a copy of, and make it the saved hash to check the next call to update again.
If a keys value has changed, itll execute the code specified when you created the object. If the key exists where it didnt before, itll pass on as the first argument, and the new value as the second. If its changed, changed and the new value. If its been deleted, itll pass off.
<<lessSYNOPSIS
my $hash_watcher = Hash::Diff::Dispatch->new(
{}, # Sets the starting hash
# The events will be called using the order returned
# by calling keys on these values...
b => &bold,
i => &italic,
);
# Will call: bold(on, 5)
$hash_watcher->update( { b => 5, a => la } );
# Will call: bold(changed, 6)
$hash_watcher->update( { b => 6 } );
# Will call: bold(changed, 0)
$hash_watcher->update( { b => 0 } );
# Will call: bold(off)
$hash_watcher->update( {} );
METHODS
new
Accepts a starting hash-ref, and then a list of keys you want to watch, and the code to execute when they change. It will take a copy of the hash in the hash-ref you specify.
update
Accepts a hash-ref, which itll take a copy of, and make it the saved hash to check the next call to update again.
If a keys value has changed, itll execute the code specified when you created the object. If the key exists where it didnt before, itll pass on as the first argument, and the new value as the second. If its changed, changed and the new value. If its been deleted, itll pass off.
Download (0.003MB)
Added: 2007-08-15 License: Perl Artistic License Price:
800 downloads
Hash::NoVivify 0.01
Hash::NoVivify is a Perl extension for non-vivifying exists and defined functions. more>>
Hash::NoVivify is a Perl extension for non-vivifying exists and defined functions.
SYNOPSIS
use Hash::NoVivify qw(Defined Exists);
...
if (Exists(%hash, qw(key1 key2 ... keyn ))) {
...
}
if (Defined(%hash, qw(key1 key2 ... keyn))) {
...
}
When used on a hash, the exists() and defined() functions will create entries in a hash in order to evaluate the function.
For instance, the code:
%a = (a => 1, b=> 2);
print "Doesnt existn" unless exists($a{c});
print "Also Doesnt existn" unless exists($a{c}->{d});
print "Oh, my, not goodn" if exists($a{c});
will print out:
Doesnt exist
Also Doesnt exist
Oh, my, not good
The Hash::NoVivify module provides two functions, Defined() and Exists(), which avoid this, at the cost of a slightly convoluted syntax. Both functions take a reference to a hash, followed by a list of descending keys defining the hash entry to be investigated.
<<lessSYNOPSIS
use Hash::NoVivify qw(Defined Exists);
...
if (Exists(%hash, qw(key1 key2 ... keyn ))) {
...
}
if (Defined(%hash, qw(key1 key2 ... keyn))) {
...
}
When used on a hash, the exists() and defined() functions will create entries in a hash in order to evaluate the function.
For instance, the code:
%a = (a => 1, b=> 2);
print "Doesnt existn" unless exists($a{c});
print "Also Doesnt existn" unless exists($a{c}->{d});
print "Oh, my, not goodn" if exists($a{c});
will print out:
Doesnt exist
Also Doesnt exist
Oh, my, not good
The Hash::NoVivify module provides two functions, Defined() and Exists(), which avoid this, at the cost of a slightly convoluted syntax. Both functions take a reference to a hash, followed by a list of descending keys defining the hash entry to be investigated.
Download (0.003MB)
Added: 2007-05-18 License: Perl Artistic License Price:
889 downloads
Tie::Proxy::Hash 1.01
Tie::Proxy::Hash is a Perl module created to efficiently merge & translate hashes. more>>
Tie::Proxy::Hash is a Perl module created to efficiently merge & translate hashes.
SYNOPSIS
my (%hash, $ref);
$ref = tie %hash, Tie::Proxy::Hash, (bart => +{a => 1,
b => 2},
maggie => +{a => 5,
c => 6,
e => 10},
);
$hash{a} == 1; # true
$hash{b} == 2; # true (bart supercedes maggie)
$hash{c} == 6; # true
! defined $hash{d}; # true
$hash{e} == 10; # true
$hash{c} = 9; # set in maggie
$hash{d} = 12; # set in default
$hash{f} = 11; # set in default
$ref->add_hash(lisa, +{d => 3, b => 4});
$hash{c} == 9; # true
$hash{b} == 2; # true (bart overrides lisa)
$hash{d} == 3; # true (lisa overrides default)
$hash{f} == 11; # true (only default knows f)
Proxy hash requests for one or more other hashes, with intermediate value translation.
Tie::Proxy::Hash merges hashes by maintaining a list of hashes to look up, and each key requested is looked up in each hash in order until a hit is found. Resultant values may be subject to a translating subr. In this way, hashes may be merged without the cost of by-value copying.
A default backing hash is provided to store values not present in other hashes.
Tying
$ref = tie %hash, Tie::Proxy::Hash,
bart => +{a => 1, b => 2},
maggie => +{a => 5, c => 6, e => 10} => sub {10*$_[0]},
;
Any arguments passed to tie are palmed off onto add_hash.
Retrieving Values
Values are retrieved by checking each hash in the order of insertion; the first hash found in which a given key exists supplies the value. The value is subject to translation if the given hash has an associated translator.
<<lessSYNOPSIS
my (%hash, $ref);
$ref = tie %hash, Tie::Proxy::Hash, (bart => +{a => 1,
b => 2},
maggie => +{a => 5,
c => 6,
e => 10},
);
$hash{a} == 1; # true
$hash{b} == 2; # true (bart supercedes maggie)
$hash{c} == 6; # true
! defined $hash{d}; # true
$hash{e} == 10; # true
$hash{c} = 9; # set in maggie
$hash{d} = 12; # set in default
$hash{f} = 11; # set in default
$ref->add_hash(lisa, +{d => 3, b => 4});
$hash{c} == 9; # true
$hash{b} == 2; # true (bart overrides lisa)
$hash{d} == 3; # true (lisa overrides default)
$hash{f} == 11; # true (only default knows f)
Proxy hash requests for one or more other hashes, with intermediate value translation.
Tie::Proxy::Hash merges hashes by maintaining a list of hashes to look up, and each key requested is looked up in each hash in order until a hit is found. Resultant values may be subject to a translating subr. In this way, hashes may be merged without the cost of by-value copying.
A default backing hash is provided to store values not present in other hashes.
Tying
$ref = tie %hash, Tie::Proxy::Hash,
bart => +{a => 1, b => 2},
maggie => +{a => 5, c => 6, e => 10} => sub {10*$_[0]},
;
Any arguments passed to tie are palmed off onto add_hash.
Retrieving Values
Values are retrieved by checking each hash in the order of insertion; the first hash found in which a given key exists supplies the value. The value is subject to translation if the given hash has an associated translator.
Download (0.019MB)
Added: 2007-07-05 License: Perl Artistic License Price:
841 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above hashes search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed