|
Re: How To Store Special Characters in oracle database 8.1.5 from forms [message #263664 is a reply to message #263625] |
Thu, 30 August 2007 12:45   |
 |
Littlefoot
Messages: 21826 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Are you sure you want to store password in such a way? It can easily be cracked (not that I can do that, but - believe me - there are bad guys who can).
OK, here it is: the simplest way would be to use the TRANSLATE function. First, code something:SQL> SELECT TRANSLATE('this is password',
2 'abcdefghijklmnopqrstuvwxyz',
3 '!"#$%&/()=?*+-.,;:_<>\|[]z'
4 ) result
5 FROM dual;
RESULT
----------------
<()_ )_ ,!__|.:$ And now, decode it back:SQL> SELECT TRANSLATE ('<()_ )_ ,!__|.:$',
2 '!"#$%&/()=?*+-.,;:_<>\|[]z',
3 'abcdefghijklmnopqrstuvwxyz'
4 ) result_decoded
5 FROM dual;
RESULT_DECODED
----------------
this is password
Is this what you are looking for? If not, I'm afraid I misunderstood you.
However, you might take a look at this Frank Naude's script which uses DBMS Obfuscation Toolkit to encrypt and decrypt a value. As your database version is quite old, I'm not sure it supports this feature; I've found a source which says that it was introduced in 8.1.6, so - it seems that you're out of luck here.
|
|
|
|
|
|
|
|
|