function js_authentication (
p_username in varchar2,
p_password in varchar2 )
return boolean
is
l_user my_users.user_name%type := upper(p_username);
l_id my_users.id%type;
l_hash my_users.password_hash%type;
begin
begin
select id , password_hash
into l_id, l_hash
from my_users
where user_name = l_user;
exception when no_data_found then
l_hash := '-invalid-';
end;
return l_hash = rawtohex(sys.dbms_crypto.hash (
sys.utl_raw.cast_to_raw (
p_password||l_id||l_user ),
sys.dbms_crypto.hash_sh512 ));
end;
Custom Authentication Function
Custom Authentication Function
Malik Sikandar Hayat
Oracle ACE Pro
info@erpstuff.com
Oracle ACE Pro
info@erpstuff.com
Who is online
Users browsing this forum: No registered users and 0 guests