Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Help !! Password Encryption/decryption ??
Here it is for any length.
SELECT RPAD('&thestring',LENGTH('&thestring') + 8 - DECODE(MOD(length('&thestring'),8),0,8,MOD(length('&thestring'),8)),' ') ||'<' AS "12345678901234567890" FROM DUAL
Tony Aponte
-----Original Message-----
From: Aponte, Tony
Sent: Friday, February 08, 2002 11:32 AM
To: 'ORACLE-L_at_fatcity.com'
Cc: 'jprem_at_srmsoft.co.in'
Subject: RE: Help !! Password Encryption/decryption ??
How about right-padding the string to a multiple of 8 bytes. I think 8-MOD(LENGTH(string),8) will give you the number of characters to use in RPAD(string,.......). E.I.. to pad with blanks:
SELECT RPAD('123456789',LENGTH('123456789') + 8 - mod(length('12345678'),8),' ') AS "12345678901234567890" FROM DUAL
1234567890123456
123456789
HTH Tony Aponte
-----Original Message-----
From: Prem J Khanna [mailto:jprem_at_srmsoft.co.in]
Sent: Friday, February 08, 2002 9:08 AM
To: Multiple recipients of list ORACLE-L
Subject: Help !! Password Encryption/decryption ??
Hello everybody ,
I am on 8.1.6/NT .
i need to encrypt / decrypt the password of my users for my web based
application.
I went thro' DBMS_OBFUSCATION_TOOLKIT.DESEncrypt and
DBMS_OBFUSCATION_TOOLKIT.DESDecrypt methods .
but as per the docs , this package requires the password ( which is to
be encrypted ) to be
in multiples of 8 bytes . i don't think this is possible always .
have i understood anything wrong ? can anyone throw some light on this
.
how do u guys encounter this situation ? any likely scripts plz ?!!!
TIA. Jp.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Prem J Khanna
INET: jprem_at_srmsoft.co.in
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 Fri Feb 08 2002 - 11:27:04 CST
![]() |
![]() |