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

Home -> Community -> Usenet -> c.d.o.server -> Re: [Help]: Looking for password crypt/decrypt function

Re: [Help]: Looking for password crypt/decrypt function

From: Connor McDonald <mcdonald.connor.cs_at_bhp.com.au>
Date: Tue, 13 Apr 1999 12:57:10 +0900
Message-ID: <3712CEA6.49C@bhp.com.au>


damita wrote:
>
>
>
> If youre just trying to encrypt user defined (not oracle login passwds)
> passwords
> try some form of: TRANSLATE(str,from,to)
>
> use same function (in reverse offcourse) to decrypt passwd.
>
> this mebbe too simple for you application, mebbe your needs call for a more
> complex algorithm.
>
> cheers
> --
> Damita Wijay db-eh?
> Magardi Inc
> Ottawa Canada
>
> ngreene_at_my-dejanews.com wrote:
>
> > Does anyone have a password crypt/decrypt function that can be used like the
> > one in mySQL? I need to store encrypted passwords in an Oracle database and
> > need a way to decrypt them as well.
> >

One easy way is:

  1. change each char in the string to ascii
  2. convert the ascii to a string of 8-bit binary
  3. exclusive-or the binary with a preknown binary key
  4. convert the result back to ascii
  5. convert the ascii back to text

The nice thing with this algorithm is that the encrypt and decrypt functions are the same...ie, re-encrypt the encrypted code to decrypt it...

Cheers

--



Connor McDonald
BHP Information Technology
Perth, Western Australia
"Never wrestle a pig - you both get dirty and the pig likes it..." Received on Mon Apr 12 1999 - 22:57:10 CDT

Original text of this message

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