phpDocumentor utility
[ class tree: utility ] [ index: utility ] [ all elements ]

Class: WindSecurity

Source Location: /utility/WindSecurity.php

Class WindSecurity

Class Overview

字符、路径过滤等安全处理

Located in /utility/WindSecurity.php [line 11]



		
				Author(s):
		
		
		
Information Tags:
Version:  $Id: WindSecurity.php 3298 2012-01-06 12:48:26Z yishuo $
Copyright:  ©2003-2103 phpwind.com
License:  http://www.windframework.com

Methods

[ Top ]
Method Summary
static string   createToken()   创建token令牌串
static string   decrypt()   解密字符串
static string   encrypt()   字符串加密
static array   escapeArrayHTML()   转义字符串
static string   escapeHTML()   转义输出字符串
static string   escapePath()   路径检查转义
static string   generateGUID()   获取唯一标识符串,标识符串的长度为16个字节,128位.

[ Top ]
Methods
static method createToken  [line 92]

  static string createToken( )

创建token令牌串

创建token令牌串,用于避免表单重复提交等. 使用当前的sessionID以及当前时间戳,生成唯一一串令牌串,并返回.


API Tags:
Deprecated:  
Access:  public


[ Top ]
static method decrypt  [line 68]

  static string decrypt( string $str, string $key, [ $iv = '']  )

解密字符串

Parameters:
string   $str:  解密的字符串
string   $key:  密钥
   $iv: 

API Tags:
Return:  解密后的结果
Access:  public


[ Top ]
static method encrypt  [line 47]

  static string encrypt( string $str, string $key, [ $iv = '']  )

字符串加密

Parameters:
string   $str:  需要加密的字符串
string   $key:  密钥
   $iv: 

API Tags:
Return:  加密后的结果
Access:  public


[ Top ]
static method escapeArrayHTML  [line 30]

  static array escapeArrayHTML( array $array  )

转义字符串

Parameters:
array   $array:  被转移的数组

API Tags:
Access:  public


[ Top ]
static method escapeHTML  [line 19]

  static string escapeHTML( string $str  )

转义输出字符串

Parameters:
string   $str:  被转义的字符串

API Tags:
Access:  public


[ Top ]
static method escapePath  [line 113]

  static string escapePath( $filePath, [boolean $ifCheck = false], string $fileName  )

路径检查转义

Parameters:
string   $fileName:  被检查的路径
boolean   $ifCheck:  是否需要检查文件名,默认为false
   $filePath: 

API Tags:
Access:  public


[ Top ]
static method generateGUID  [line 102]

  static string generateGUID( )

获取唯一标识符串,标识符串的长度为16个字节,128位.

根据当前时间与sessionID,混合生成一个唯一的串.


API Tags:
Return:  GUID串,16个字节
Access:  public


[ Top ]

Documentation generated on Fri, 30 Mar 2012 11:43:39 +0800 by phpDocumentor 1.4.4