Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Encrypting a number into another number?
Pomme-granite wrote:
> I need a simple PL/SQL algorithm for encrypting one integer (up to 6
> digits) into another 6 digit integer, so DBMS_OBFUSCATION_TOOLKIT
> isn't of use. I have already written something which uses simple
> XORing, Newvalue := InputValue XOR bitmask, but patterns still emerge
> for consequetive InputValues.
>
> What I need doesn't have to be too secure, but I do need to give a
> more diverse range in output than simple XORing. Any ideas?
>
> Thanks
> Pomme-granite
Create a table with six columns and use DBMS_RANDOM to load all columns for 1000 rows.
Then arbitrarily make a decision such as:
first digit equals the first digit of the 75th row. second digit equals the second digit of the 577th row. third digit equals the third digit of the 902nd row. etc.
Then take the decryption function and, write it as a local function in a package body or as an operator and wrap it.
No one other than a government agency with massive computing power will be able to decrypt it.
-- Daniel Morgan http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp http://www.outreach.washington.edu/extinfo/certprog/aoa/aoa_main.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Wed Aug 27 2003 - 11:16:54 CDT
![]() |
![]() |