Login password encryption function, user login main form implementation method and specific code

Source: Internet
Author: User
Tags end return
function | Encrypt create function pwd:create function pwd (SDPASSWORD VARCHAR2)  return varchar2 is     len   number;    szpwd varchar2 (; ) begin     len:=length (Sdpassword);     for i in 1..len loop        szpwd:=szpwd| |                     Chr (ASCII (substr (sdpassword,i,1)) + (len-i) *i*i+len);     end loop;      return (szpwd);  end; /  Specific use: 1. Add a trriggers:key-others in block, code:null;  prevent users from using shift  + f7 illegally entered. 2. In ok OK Button plus a when-button-pressed, code: DECLARE    szpwd          VARCHAR2           --Password     Szjmpwd       varchar2           --plus password    szjs           VARCHAR2   :=  ' 4 '   --role BEGIN     select password, js      into szpwd, szjs       FROM prid01                        --user Registration form in the Rights Management     where  userid = :login.userid;    szjmpwd := pwd  nvl  (: Login. password,  ' @ '));    if szpwd = szjmpwd then       : global.userid := :login.userid;       :GLOBAL.username := :login.username;       :GLOBAL.js := szjs;       :gLobal. Password := :login. PASSWORD;       :GLOBAL.nls_lang := :login.nls_language;       --init_menu;             --Initialize Menu Permissions       --init_nav;              --ERP Flowchart permissions on the initialization toolbar       --init_nav_hr;          --the Human Resources module flowchart permissions on the initialization toolbar       go_ block  (' MAIN ');       --set_item_property (' No_display_next_time ', VISIBLE,PROPERTY_TRUE);       --set_item_property (' No_display_next_time ', ENABLED,PROPERTY_TRUE);       --execute_trigger (' HINT ');    --perform daily a small program     ELSE       messagebox.messagebox  (nls_error  (Nls_lang,  ' 00004 ');                       --This is my own multilingual messagebox, you can use your       go_item   (' Login.password ');    END IF; EXCEPTION    when no_data_found then        messagebox.messagebox  (nls_error  (nls_lang,  ' 00007 '));                      --This is my own multilingual messagebox, you can use your       GO_ITEM  (' Login.userid ');    when others then       messagebox.messagebox  ( SQLERRM); End;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.