10-18-2010
Hashing is a complicated technique for getting a checksum or integer from a string or whole file. The checksum of a file can show it was probably not modified since leavinga trusted source. The integer can be used to pick (modulo bucket count) a bucket for a random lookup, a hash mapping.
Are you in file verification or high speed lookup?
---------- Post updated at 04:26 PM ---------- Previous update was at 04:25 PM ----------
Or command location in the shell?
hash (Unix) - Wikipedia, the free encyclopedia
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
how can one find that which encryption algorithm the system is using for keeping the user password in the /etc/passwd or /etc/shadow file.
Is it
1: Hashing ( which considers only first 5 letters of password)
2: MD5 (Which allows arbitry length passwords)
Thanks,
~amit (0 Replies)
Discussion started by: amit4g
0 Replies
2. Shell Programming and Scripting
Hi guys,
I have multiple files (>5000) which I have in a folder. I read every file name and put it in a tmp variable "i" so that i can use it in the following task.
I have a large .txt file (>50 MB) in which I want to find the variable "i" and the lines after this variable, so that I can use... (4 Replies)
Discussion started by: Ashitaka007
4 Replies
3. UNIX for Dummies Questions & Answers
I am looking for a utility that does file hashing in unix. ...Please let me know of any good easy to use utility (3 Replies)
Discussion started by: jbjoat
3 Replies
4. Programming
Hi,
I'm looking for linear hashing implementation in C language. Please help.
PS: I have implement this on Ubuntu 10.04 Linux on 64 bit machine. (1 Reply)
Discussion started by: sajjar
1 Replies
5. UNIX for Advanced & Expert Users
I'm collecting some info on the password hashing algorithms in use on various Unix systems. So far I have:
no $ legacy unix crypt
$1$ MD5
$2$ Blowfish on BSD
$2a$ alternate Blowfish on BSD
$md5$ Sun's alternate MD5
$3$ a Microsoft hash
$4$ not used?
$5$ RedHat proposed Sha-256... (2 Replies)
Discussion started by: Perderabo
2 Replies
6. Programming
Hi, I have two files:
Input_file1.txt
124
235
152
178
156
142
178
163
159
Input_file2.txt
124|5623
452|6698
178|9995
235|7542
159|8852 (1 Reply)
Discussion started by: cpp_beginner
1 Replies
7. UNIX for Dummies Questions & Answers
Hi Dears,
I use the below code to analyze lines in a file:
for line in `cat ucsv`
do
echo $line
//analyze statements
donehowever, if line contains space char, it will be broken. for example, if file content is:
#login,full name,email,project,role,action
gmwen,Bruce... (3 Replies)
Discussion started by: crest.boy
3 Replies
8. Solaris
Hello,
I'm having an issue with my password hashing. In /etc/shadow all the passwords hashes start with $1$. The security people want me to change it so the password hash starts with $5$ or $6$. So this is what I did to fix this.
I changed CRYPT_DEFAULT for 1 to 6
CRYPT_DEFAULT=6When I create a... (0 Replies)
Discussion started by: bitlord
0 Replies
9. Shell Programming and Scripting
So, I am writing a script that will read output from Bulk Extractor (which gathers data based on regular expressions). My script then reads the column that has the URL found, hashes it with MD5, then outputs the URL and hash to a file.
Where I am stuck on is that I want to read the bulk... (7 Replies)
Discussion started by: twjolson
7 Replies
10. UNIX for Advanced & Expert Users
Hello Team,
Could You give me some hints how I should review the sosreport that I generated? I know how to analysis the SAR files however sosreport is my last hope - python script has hunged and I would like to know the root cause - for this is not performance issue.
Thanks in advance!
... (3 Replies)
Discussion started by: nsmcny
3 Replies
LEARN ABOUT DEBIAN
libtar_hash_new
libtar_hash_new(3) C Library Calls libtar_hash_new(3)
NAME
libtar_hash_new, libtar_hash_free, libtar_hash_next, libtar_hash_prev, libtar_hash_getkey, libtar_hash_search, libtar_hash_add, lib-
tar_hash_del - hash table routines
SYNOPSIS
#include <libtar.h>
libtar_hash_t *libtar_hash_new(int num, int (*hashfunc)());
void libtar_hash_free(libtar_hash_t *h, void (*freefunc)());
int libtar_hash_next(libtar_hash_t *h, libtar_hashptr_t *hp);
int libtar_hash_prev(libtar_hash_t *h, libtar_hashptr_t *hp);
int libtar_hash_search(libtar_hash_t *h, libtar_hashptr_t *hp, void *data, int (*matchfunc)());
int libtar_hash_getkey(libtar_hash_t *h, libtar_hashptr_t *hp, void *data, int (*matchfunc)());
int libtar_hash_add(libtar_hash_t *h, void *data);
int libtar_hash_del(libtar_hash_t *h, libtar_hashptr_t *hp);
DESCRIPTION
The libtar_hash_new() function creates a new hash with num buckets and using hash function pointed to by hashfunc. If hashfunc is NULL, a
default hash function designed for 7-bit ASCII strings is used.
The libtar_hash_free() function deallocates all memory associated with the hash structure h. If freefunc is not NULL, it is called to free
memory associated with each node in the hash.
The libtar_hash_next() and libtar_hash_prev() functions are used to iterate through the hash. The libtar_hashptr_t structure has two
fields: bucket, which indicates the current bucket in the hash, and node, which is a pointer to the current node in the current bucket. To
start at the beginning or end of the hash, the caller should initialize hp.bucket to -1 and hp.node to NULL.
The libtar_hash_search() function searches iteratively through the hash h until it finds a node whose contents match data using the match-
ing function matchfunc. Searching begins at the location pointed to by hp.
The libtar_hash_getkey() function uses the hash function associated with h to determine which bucket data should be in, and searches only
that bucket for a matching node using matchfunc. Searching begins at the location pointed to by hp.
The libtar_hash_add() function adds data into hash h.
The libtar_hash_del() function removes the node referenced by hp.
RETURN VALUE
The libtar_hash_new() function returns a pointer to the new hash structure, or NULL on error.
The libtar_hash_next() and libtar_hash_prev() functions return 1 when valid data is returned, and 0 at the end of the hash.
The libtar_hash_getkey() and libtar_hash_search() functions return 1 when a match is found, or 0 otherwise.
The libtar_hash_add() function returns 0 on success, or -1 on error (and sets errno).
The libtar_hash_del() function returns 0 on success, or -1 on error (and sets errno).
SEE ALSO
libtar_list_new(3)
University of Illinois Jan 2000 libtar_hash_new(3)