成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

ORACLE密碼策略驗證程序

數據庫 Oracle
ORACLE數據庫的密碼策略關系到數據庫的安全,下文對密碼策略驗證程序作了詳細的介紹,希望對您能夠有所幫助。

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

密碼字符串要求:

-- 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. :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. <<findchar>> 
  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. <<findpunct>> 
  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. <<endsearch>> 
  17. -- Check if the password differs from the previous password by at least  
  18. -- 3 letters  
  19. IF old_password IS NOT NULL THEN  
  20. differ :length(old_password) - length(password);  
  21.  
  22. IF abs(differ) < 3 THEN  
  23. IF length(password) < length(old_password) THEN  
  24. :length(password);  
  25. ELSE  
  26. :length(old_password);  
  27. END IF;  
  28.  
  29. differ :abs(differ);  
  30. FOR i IN 1..m LOOP  
  31. IF substr(password,i,1) != substr(old_password,i,1) THEN  
  32. differ :differ + 1;  
  33. END IF;  
  34. END LOOP;  
  35.  
  36. IF differ < 3 THEN  
  37. raise_application_error(-20004, 'Password should differ by at   
  38. least 3 characters');  
  39. END IF;  
  40. END IF;  
  41. END IF;  
  42. -- Everything is fine; return TRUE ;   
  43. RETURN(TRUE);  
  44. END;   
  45.  

 

 

 

【編輯推薦】

Oracle密碼文件管理

教您如何檢查oracle死鎖

Oracle存儲過程讀寫文件

Oracle物化視圖創建全過程

ORACLE創建實例的過程

 

責任編輯:段燃 來源: 互聯網
相關推薦

2009-11-18 09:52:21

Oracle密碼驗證

2013-03-12 09:51:02

2015-12-02 16:46:20

2015-10-28 15:35:33

Oracle策略

2009-11-19 15:32:50

Oracle索引

2022-06-06 06:10:00

密碼驗證安全

2010-01-30 11:23:59

2010-10-26 13:17:28

oracle備份策略

2010-04-07 11:04:52

Oracle用戶密碼

2010-02-22 14:53:17

WCF用戶密碼

2012-04-10 09:36:58

2021-01-03 09:33:48

密碼數字身份加密解密

2010-11-19 11:51:40

Oracle密碼文件

2012-10-23 16:12:35

2009-09-27 17:07:04

Hibernate J

2009-11-06 17:21:36

驗證Oracle SQ

2009-05-26 15:18:45

2019-04-09 09:50:00

2020-04-01 12:20:15

Linux密碼策略

2011-08-10 10:30:46

點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 欧美激情五月 | 国产日韩免费视频 | 亚洲一区中文字幕在线观看 | 亚洲精品黑人 | 欧美区在线 | 成人av免费 | 91文字幕巨乱亚洲香蕉 | 成人av一区二区三区 | 国产视频久 | 盗摄精品av一区二区三区 | 自拍偷拍中文字幕 | 国产高清免费 | 亚洲二区在线观看 | 天天干夜夜拍 | 欧美综合国产精品久久丁香 | 久久久久久久亚洲精品 | 一区二区三区不卡视频 | 天天干天天操天天射 | 黄色在线免费观看 | 日韩欧美专区 | 精品一区二区三区电影 | 午夜影院操 | 欧美激情一区二区三区 | 久久久久久国产一区二区三区 | 国产高清精品一区二区三区 | 午夜视频一区 | 91精品久久久| 91电影在线播放 | 日日夜夜操天天干 | 日本一区二区高清不卡 | 中文字幕亚洲精品在线观看 | 91久久国产综合久久 | 成人免费在线观看视频 | 成人精品在线视频 | 中文字幕一区二区三区四区五区 | 国产高清在线观看 | 国产免费观看一区 | 久久久久午夜 | 欧美成人手机视频 | 99久久久国产精品 | 亚洲欧美视频 |