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 44 45 46 47 48
| SQL> create or replace procedure
2 Ajouter_Responsable(l_key in varchar2,
3 l_code_resp in varchar2,
4 l_nom_resp in varchar2,
5 l_prenom_resp in varchar2,
6 l_grade_resp in varchar2,
7 l_tel_resp in varchar2,
8 l_email_resp in varchar2,
9 l_adr_resp in varchar2,
10 l_login_resp in varchar2,
11 l_mdp_resp in varchar2,
12 l_actif_resp in varchar2,
13 l_code_prof in varchar2)
14 is
15
16 l_data varchar2(2000);
17 key_check_flag number;
18 l_encrypted_string varchar2(2000);
19
20 begin
21
22 l_data := rpad(l_mdp_resp,(trunc(length(l_mdp_resp)/8)+1)*8,chr(0));
23 key_check_flag := mod(length(l_key),8);
24 if key_check_flag != 0 then
25 raise_application_error(-20199,'clé doit être de 8 caractères de long');
26 end if;
27 dbms_obfuscation_toolkit.desencrypt
28 (input_string => l_data,
29 key_string => l_key,
30 encrypted_string => l_encrypted_string);
31
32
33 insert into responsable (code_resp, nom_resp , prenom_resp, grade_resp, tel_resp, email_resp, a
dr_resp, login_resp, mdp_resp, actif_resp, code_prof)
34 values (l_code_resp, l_nom_resp, l_prenom_resp, l_grade_resp, l_tel_resp, l_email_resp, l_adr_
resp, l_login_resp, l_mdp_resp, l_actif_resp, l_code_prof, l_encrypted_string);
35 end;
36 /
Avertissement : Procédure créée avec erreurs de compilation.
SQL> sho err;
Erreurs pour PROCEDURE AJOUTER_RESPONSABLE :
LINE/COL ERROR
-------- -----------------------------------------------------------------
33/1 PL/SQL: SQL Statement ignored
33/13 PL/SQL: ORA-00913: trop de valeur |
Partager