Bonjour,
jai un packge de cryptage dont voici le code :
quand j'execute ce code directement sur la BDD pas de probleme j'obtien ma chaine AA
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 CREATE OR REPLACE package body Mot_de_passe_encrypt is ------------ CRYPTAGE ----------------- procedure encrypt_password ( P_mot_passe_in IN varchar2, P_mot_passe_out OUT varchar2) is begin P_mot_passe_out :=dbms_obfuscation_toolkit.DESEncrypt( input_string => P_mot_passe_in, key_string => 'ABCDEFGH'); EXCEPTION WHEN others THEN dbms_output.put_line('Probleme Cryptage :'||sqlerrm); end; ----------------------------------------- ------------ DECRYPTAGE ----------------- procedure decrypt_password ( P_mot_passe_in IN varchar2, P_mot_passe_out OUT varchar2 )is begin P_mot_passe_out := dbms_obfuscation_toolkit.DESDecrypt( input_string => P_mot_passe_in, key_string => 'ABCDEFGH'); EXCEPTION WHEN others THEN dbms_output.put_line('Probleme Decryptage :'||sqlerrm); END ; ----------------------------------------- end ; /
mais quand je l'execute dans oracle forms
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 declare P_mot_passe_in varchar2(2000); P_mot_passe_out varchar2(2000); begin P_mot_passe_in := 'AA'; Mot_de_passe_encrypt.encrypt_password(RPAD(P_mot_passe_in,(TRUNC(LENGTH(P_mot_passe_in)/8)+1)*8,CHR(0)) ,P_mot_passe_out); Mot_de_passe_encrypt.decrypt_password(P_mot_passe_out ,P_mot_passe_in); dbms_output.put_line(P_mot_passe_out); dbms_output.put_line(P_mot_passe_in); end;
j'obtien une chaine qui n'a rien a voir
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 declare P_mot_passe_in varchar2(2000); P_mot_passe_out varchar2(2000); begin P_mot_passe_in := 'AA'; Mot_de_passe_encrypt.encrypt_password(RPAD(P_mot_passe_in,(TRUNC(LENGTH(P_mot_passe_in)/8)+1)*8,CHR(0)) ,P_mot_passe_out); Mot_de_passe_encrypt.decrypt_password(P_mot_passe_out ,P_mot_passe_in); message(P_mot_passe_out);pause message(P_mot_passe_in);pause; end;
ya t'il un parametre que j'ai oublié?
Partager