日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
ORACLE密碼策略驗(yàn)證程序

ORACLE密碼策略非常重要,下面就為您詳細(xì)介紹ORACLE密碼策略驗(yàn)證程序,如果您對(duì)ORACLE密碼策略方面感興趣的話,不妨一看。

成都創(chuàng)新互聯(lián)致力于互聯(lián)網(wǎng)網(wǎng)站建設(shè)與網(wǎng)站營(yíng)銷,提供成都網(wǎng)站設(shè)計(jì)、成都做網(wǎng)站、網(wǎng)站開發(fā)、seo優(yōu)化、網(wǎng)站排名、互聯(lián)網(wǎng)營(yíng)銷、小程序制作、公眾號(hào)商城、等建站開發(fā),成都創(chuàng)新互聯(lián)網(wǎng)站建設(shè)策劃專家,為不同類型的客戶提供良好的互聯(lián)網(wǎng)應(yīng)用定制解決方案,幫助客戶在新的全球化互聯(lián)網(wǎng)環(huán)境中保持優(yōu)勢(shì)。

密碼字符串要求:

-- Check if the password is same as the username
-- Check for the minimum length of the password
-- Check if the password contains at least one letter, one digit and one
-- Check if the password differs from the previous password by at least

CREATE OR REPLACE FUNCTION SYS.verify_function
(username varchar2,
password varchar2,
old_password varchar2)
RETURN boolean IS
n boolean;
m integer;
differ integer;
isdigit boolean;
ischar boolean;
ispunct boolean;
digitarray varchar2(20);
punctarray varchar2(25);
chararray varchar2(52);

BEGIN
digitarray:= '0123456789';
chararray:= 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
punctarray:='!"#$%&()``*+,-/:;<=>?_';

-- Check if the password is same as the username
IF NLS_LOWER(password) = NLS_LOWER(username) THEN
raise_application_error(-20001, 'Password same as or similar to user');
END IF;

-- Check for the minimum length of the password
IF length(password) < 8 THEN
raise_application_error(-20002, 'Password length less than 8');
END IF;

-- Check if the password is too simple. A dictionary of words may be
-- maintained and a check may be made so as not to allow the words
-- that are too simple for the password.
IF NLS_LOWER(password) IN ('welcome', 'database', 'account', 'user', 'password', 'oracle', 'computer', 'abcd') THEN
raise_application_error(-20002, 'Password too simple');
END IF;

-- Check if the password contains at least one letter, one digit and one
-- punctuation mark.
-- 1. Check for the digit

 
 
 
  1. isdigit:=FALSE;
  2. m := length(password);
  3. FOR i IN 1..10 LOOP 
  4. FOR j IN 1..m LOOP 
  5. IF substr(password,j,1) = substr(digitarray,i,1) THEN
  6. isdigit:=TRUE;
  7. GOTO findchar;
  8. END IF;
  9. END LOOP;
  10. END LOOP;
  11. IF isdigit = FALSE THEN
  12. raise_application_error(-20003, 'Password should contain at least one digit, one character and one punctuation');
  13. END IF;

-- 2. Check for the character

 
 
 
  1. <>
  2. ischar:=FALSE;
  3. FOR i IN 1..length(chararray) LOOP 
  4. FOR j IN 1..m LOOP 
  5. IF substr(password,j,1) = substr(chararray,i,1) THEN
  6. ischar:=TRUE;
  7. GOTO findpunct;
  8. END IF;
  9. END LOOP;
  10. END LOOP;
  11. IF ischar = FALSE THEN
  12. raise_application_error(-20003, 'Password should contain at least one 
  13. digit, one character and one punctuation');
  14. END IF;

-- 3. Check for the punctuation

 
 
 
  1. <>
  2. ispunct:=FALSE;
  3. FOR i IN 1..length(punctarray) LOOP 
  4. FOR j IN 1..m LOOP 
  5. IF substr(password,j,1) = substr(punctarray,i,1) THEN
  6. ispunct:=TRUE;
  7. GOTO endsearch;
  8. END IF;
  9. END LOOP;
  10. END LOOP;
  11. IF ispunct = FALSE THEN
  12. raise_application_error(-20003, 'Password should contain at least one 
  13. digit, one character and one punctuation');
  14. END IF;
  15. <>
  16. -- Check if the password differs from the previous password by at least
  17. -- 3 letters
  18. IF old_password IS NOT NULL THEN
  19. differ := length(old_password) - length(password);
  20. IF abs(differ) < 3 THEN
  21. IF length(password) < length(old_password) THEN
  22. m := length(password);
  23. ELSE
  24. m := length(old_password);
  25. END IF;
  26. differ := abs(differ);
  27. FOR i IN 1..m LOOP
  28. IF substr(password,i,1) != substr(old_password,i,1) THEN
  29. differ := differ + 1;
  30. END IF;
  31. END LOOP;
  32. IF differ < 3 THEN
  33. raise_application_error(-20004, 'Password should differ by at 
  34. least 3 characters');
  35. END IF;
  36. END IF;
  37. END IF;
  38. -- Everything is fine; return TRUE ; 
  39. RETURN(TRUE);
  40. END; 

網(wǎng)站名稱:ORACLE密碼策略驗(yàn)證程序
鏈接地址:http://m.5511xx.com/article/ccojdse.html