Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: how to get back value stored through get_hash_value function..

Re: how to get back value stored through get_hash_value function..

From: Stephane Faroult <sfaroult_at_oriolecorp.com>
Date: Thu, 19 Jul 2001 03:16:51 -0700
Message-ID: <F001.0034E4E3.20010719025520@fatcity.com>

Saurabh Sharma wrote:
>
> hi list,
>
> dbms_utility.get_hash_value converts a string into its hash value..
> how do we get back the original value while selecting the entire
> record.
>
> TIA
>
> Saurabh Sharma
>
> saurabh00pc_at_yahoo.com
> http://www.geocities.com/saurabh00pc/stride.html

You can't. A hash function takes some input and transmogrifies it into something which hopefully is uniformly spread among a given spectrum. If h(a) is different from h(b) then a and b are different, but a != b doesn't imply h(a) != h(b) (if I remember well it means that the function is not injective. Too many years away and my daughters are too young for my having refreshed all this ...), which is why you *may* have collisions and when searching you must still compare against the non-hashed value. It's a bit like encryption, there is no reverse function.

--
Regards,

  Stephane Faroult
  Oriole Corporation
------------------------------------------------------------------
http://www.oriolecorp.com, designed by Oracle DBAs for Oracle DBAs
------------------------------------------------------------------
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroult
  INET: sfaroult_at_oriolecorp.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Jul 19 2001 - 05:16:51 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US