1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
C:\Marius\dev\PlSql>sqlplus mni/mni
SQL*Plus: Release 10.2.0.3.0 - Production on Sam. DÚc. 1 22:45:10 2007
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
ConnectÚ Ó :
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> Create Or Replace function PassWd(p_in Varchar2) return varchar2
2 Is
3 md5key varchar2(4000);
4 Begin
5 md5key := dbms_obfuscation_toolkit.md5(input => utl_raw.cast_to_raw(p_in)
);
6 return SubStr(p_in,1,1)||SubStr(md5key,1,29);
7 End;
8 /
Fonction crÚÚe.
SQL>
SQL> select PassWd('toto/tiger') from dual
2 /
PASSWD('TOTO/TIGER')
--------------------------------------------------------------------------------
tDAAA6FD23B96B79CAA5D55DD09AD3
SQL> create user toto identified by tDAAA6FD23B96B79CAA5D55DD09AD3;
Utilisateur crÚÚ.
SQL> grant connect to toto;
Autorisation de privilÞges (GRANT) acceptÚe.
SQL> connect toto/tDAAA6FD23B96B79CAA5D55DD09AD3;
ConnectÚ.
SQL> |
Partager