Main > Free Download Search >

Free hash software for linux

hash

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 798
hash.c 2

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.
<<less
Download (0.004MB)
Added: 2006-09-22 License: BSD License Price:
1188 downloads
UnHash 0.6

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.

<<less
Download (0.022MB)
Added: 2007-02-17 License: GPL (GNU General Public License) Price:
1007 downloads
Nsmhash 1.1

Nsmhash 1.1


nsmhash is an aolserver module that implements an interface to the mhash library (libmhash). more>>
nsmhash is an aolserver module that implements an interface to the mhash library (libmhash).
It supports hash, hmac, and key generation algorithms (such as SHA1, MD5, MCRYPT, and S2K_SALTED), and it also supports sharing with nsv_* commands. Nsmhash was tested with aolserver 3.4.x and 4.0.x.
Main features:
- support hash algorithms
- support hmac algorithms
- support key generator
- available shared with nsv_*
Version restrictions:
- An interface to the standard Tcl language was added as the nsmhash package.
<<less
Download (0.018MB)
Added: 2006-11-28 License: GPL (GNU General Public License) Price:
1060 downloads
fb_shash 1.0

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.
<<less
Download (0.56MB)
Added: 2006-10-30 License: GPL (GNU General Public License) Price:
1090 downloads
Set::Hash 0.01

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.

<<less
Download (0.007MB)
Added: 2006-12-18 License: Perl Artistic License Price:
1040 downloads
fb_mhash 1.2

fb_mhash 1.2


fb_mhash is a UDF library for Firebird/Interbase. more>>
fb_mhash is a UDF library for Firebird/Interbase. fb_mhash implements an interface to the mhash library (libmhash).
It support hash, hmac, and key generation algorithms, such as SHA1, MD5, MCRYPT, and S2K_SALTED.
Main features:
- support hash algorithms
- support hmac algorithms
- support key generator
Enhancements:
- Improved compatibility with Windows, and compiled versions of the library for Windows and Linux.
<<less
Download (0.016MB)
Added: 2006-07-25 License: LGPL (GNU Lesser General Public License) Price:
1186 downloads
hashit 0.9.4

hashit 0.9.4


hashit is a generic hash library. more>>
hashit is a generic hash library.
hashit implements diverse collision handling methods.
This function creates a hash table which is returned as a hash_t type. errno is set to ENOMEM if there wasnt enough memory avaliable for creating the table.
Return value is a reference to the table just created or NULL when the table creation has failed.
Parameters:
- sizehint:
Its used to give an aproximated desired value for the hash table, the function calculates the real size of the table using this parameter as a hint to the final value.
- keysize:
This is the size for the data type used as a key in the hash table. Keys are void *, so hashit needs to know how long they are. If key size is 0, is assumed that keys are strings.
- hfunc:
hfunc is a pointer to the hash function for the hash table. Typically you want to put here the value NULL to use the default hash function. Avaliable hash functions are BOB_HASH(Default) and ONEAT_HASH. You can add your own hash function if you know what are you doing.
- cfunc:
cfunc is the comparation function for the keys data. Semantics are the same that in strcmp function. The function should return 0 if both keys are equal, and a value different from zero if they are not.
- flags:
flags can have the following values:
CHAIN_H:
Hash table uses chaining for handling collisions
OADDRESS_H:
Hash table uses open address hashing for handling collisions
OVERFLOW_H:
Hasht table uses an overflow area for handling collisions
If youre not sure about what collision handling your hash table should have, then use CHAIN_H.
- int hashit_insert (hash_t htable, void *key, void *data)
Enhancements:
- The build system was updated to the latest version of mobs.
- This version is prepared to use pkg-config files, so hashit has now a .pc file included.
<<less
Download (0.028MB)
Added: 2006-05-18 License: GPL (GNU General Public License) Price:
1258 downloads
Hash::Type 1.05

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");

<<less
Download (0.008MB)
Added: 2007-08-06 License: Perl Artistic License Price:
813 downloads
Hash::Merge 0.10

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,
);

<<less
Download (0.007MB)
Added: 2007-06-28 License: Perl Artistic License Price:
851 downloads
Hash::Case 1.003

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.

<<less
Download (0.005MB)
Added: 2007-05-18 License: Perl Artistic License Price:
891 downloads
libmhash 0.9.9

libmhash 0.9.9


libmhash provides an easy to use C interface for several hashalgorithms. more>>
libmhash is a free library which provides a uniform interface to a large number of hash algorithms. These algorithms can be used to compute checksums, message digests, and other signatures.
The HMAC support implements the basics for message authentication, following RFC 2104. In the later versions some key generation algorithms, which use hash algorithms, have been added.
At the time of writing this, the library supports the algorithms:
SHA1, SHA160, SHA192, SHA224, SHA384, SHA512, HAVAL128, HAVAL160, HAVAL192, HAVAL224, HAVAL256, RIPEMD128, RIPEMD256, RIPEMD320, MD4, MD5, TIGER, TIGER128, TIGER160, ALDER32, CRC32, CRC32b, WHIRLPOOL, GOST, SNEFRU128, SNEFRU256.
Enhancements:
- A SIGBUS bug was fixed for unaligned data.
<<less
Download (0.83MB)
Added: 2007-04-05 License: LGPL (GNU Lesser General Public License) Price:
944 downloads
Hash::NoVivify 0.01

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.

<<less
Download (0.003MB)
Added: 2007-05-18 License: Perl Artistic License Price:
889 downloads
Tie::Hash::Stack 0.09

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.

<<less
Download (0.006MB)
Added: 2007-02-15 License: Perl Artistic License Price:
982 downloads
Tie::Proxy::Hash 1.01

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.

<<less
Download (0.019MB)
Added: 2007-07-05 License: Perl Artistic License Price:
841 downloads
Tie::Hash::Sorted 0.10

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.

<<less
Download (0.008MB)
Added: 2007-07-13 License: Perl Artistic License Price:
833 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 5
  • 1
  • 2
  • 3
  • 4
  • 5