[asterisk-users] Can someone give a plain english explanation of the HASH function?

Igor Hernandez emistz at gmail.com
Sat Sep 13 20:39:13 CDT 2008


In that case a hash function is a function that turns input into output
formatted according to a hashing algorithm. This is done either to:

A)Create a somewhat unique signature of something(like an md5 checksum).

B)Store passwords in a non-decryptable way in which case running the
plaintext password through the hashing function using the same hashing
algorithm will equal the stored hashed password.

C)Optimize table lookups.

D)A million other things. You should check out the wikipedia link Alex gave.


Eric Chamberlain wrote:
> An Asterisk specific, oversimplified, reductionist example would be  
> fine.
> 
> On Sep 13, 2008, at 5:47 PM, Alex Balashov wrote:
> 
>> There is no "plain English" explanation that is not made with  
>> reference
>> to the concept of a hash, which is an algorithmic and programmatic
>> technique.  The HASH() function is designed for people that understand
>> what hashing is and need to make use of it.
>>
>> So, the answer is, "it provides a hashing mechanism to the user."
>>
>> The simplest way to discover what hashing is would be to educate
>> yourself about hash tables and associative arrays (which provide
>> high-level, usually type-safe syntactical bindings around the use of
>> hash tables) in other contexts, after which it should be clear.
>> Soliciting any sort of Asterisk-specific explanation is going to give
>> you an incomplete, oversimplified, and/or reductionist viewpoint.
>>
>> I would start here:
>>
>>   http://en.wikipedia.org/wiki/Hash_function
>>
>> Cheers,
>>
>> -- Alex
>>
>>
>> Eric Chamberlain wrote:
>>
>>> Can someone explain what the HASH function does and how to use it?
>>>
>>>
>>>   -= Info about function 'HASH' =-
>>>
>>> [Syntax]
>>> HASH(hashname[,hashkey])
>>>
>>> [Synopsis]
>>> Implementation of a dialplan associative array
>>>
>>> [Description]
>>> In two argument mode, gets and sets values to corresponding keys
>>> within a named
>>> associative array.  The single-argument mode will only work when
>>> assigned to from
>>> a function defined by func_odbc.so.
>> -- 
>> Alex Balashov
>> Evariste Systems
>> Web    : http://www.evaristesys.com/
>> Tel    : (+1) (678) 954-0670
>> Direct : (+1) (678) 954-0671
>> Mobile : (+1) (706) 338-8599
>>
>> _______________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> AstriCon 2008 - September 22 - 25 Phoenix, Arizona
>> Register Now: http://www.astricon.net
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> --
> Eric Chamberlain
> Founder
> RF.com
> http://RF.com/
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> AstriCon 2008 - September 22 - 25 Phoenix, Arizona
> Register Now: http://www.astricon.net
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 


-- 
Igor Hernandez
Escape Communications
http://www.escapetel.com



More information about the asterisk-users mailing list