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:Data encryption in Oracle 7.x

Re:Data encryption in Oracle 7.x

From: <dgoulet_at_vicr.com>
Date: Mon, 21 May 2001 13:54:40 -0700
Message-ID: <F001.00309C26.20010521134544@fatcity.com>

Val,

    I doubt that this does DES encryption, but it may be better than nothing and it does work in Oracle7. (atually came from MetaStink)

create or replace package encrypt as

   function code(inp_data varchar2, key varchar2 default '<FILL IN THE BLANK>') return varchar2;

   pragma restrict_references(code, RNDS, WNDS, WNPS); end;
/

create or replace package body encrypt is

   function convbin(c1 varchar2) return varchar2 is

     loop1 number;
     value number;
     divis number;
     r1 varchar2(30);
   begin
     r1 := '';
     divis := 128;
     value := ascii(c1);
     for loop1 in 0..7 loop
       if(trunc(value/divis) = 1) then
         r1 := r1||'1';
       else
         r1 := r1||'0';
       end if;
       value := mod(value, divis);
       divis := divis/2;
     end loop;
     return r1;

   end;    

   function code(inp_data varchar2, key varchar2 default '<FILL IN THE BLANK>') return varchar2 is

     loop1 number;
     loop11 number;
     r1 varchar2(8);
     r2 varchar2(8);
     key1 varchar2(4000);
     r3 number;
     result varchar2(40);
     divis number;
   begin
     key1 := key;
     while (length(inp_data) > length(key1)) loop
       key1 := key1||key1;
     end loop;
     result := '';
     for loop1 in 1..length(inp_data) loop
       r1 := convbin(substr(inp_data,loop1,1));
       r2 := convbin(substr(key1,loop1,1));
       divis := 128;
       r3 := 0;
       for loop11 in 1..8 loop
         if(to_number(substr(r1,loop11,1))+to_number(substr(r2,loop11,1)) = 1)
then
             r3 := r3+divis;
         end if;
         divis := divis/2;
       end loop;
       result := result||chr(r3);
     end loop;
     return result;

   end;
end;
/
____________________Reply Separator____________________
Author: Val_Gamerman/Victoria_Financial.VICTORIA_FINANCIAL_at_lnn.com
Date:       5/21/2001 1:22 PM




Hello fellow DBA's,

I am in a tough situation. I am trying to find an encryption solution for Oracle 7.

I know that 8i has DBMS_OBFUSCATION_TOOLKIT, however we don't have 8i :(

We are still running 7.3.4 (OS limitations, DOS clients :(((((.

Anyway, did any of you ever have to implement DES or one-way encryption in Oracle 7.x?
Anyone of these solutions would help (the problem is that we would like to avoid encryption done in the application due to some limitations of the development environment).

Thanks in advance for any help, links, directions...

Val Gamerman.

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: Val_Gamerman/Victoria_Financial.VICTORIA_FINANCIAL_at_lnn.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).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: dgoulet_at_vicr.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 Mon May 21 2001 - 15:54:40 CDT

Original text of this message

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