本文整理汇总了PHP中PHPExcel_Shared_PasswordHasher类的典型用法代码示例。如果您正苦于以下问题:PHP PHPExcel_Shared_PasswordHasher类的具体用法?PHP PHPExcel_Shared_PasswordHasher怎么用?PHP PHPExcel_Shared_PasswordHasher使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PHPExcel_Shared_PasswordHasher类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: protectCells
/**
* Set protection on a cell range
*
* @param string $pRange Cell (e.g. A1) or cell range (e.g. A1:E1)
* @param string $pPassword Password to unlock the protection
* @param boolean $pAlreadyHashed If the password has already been hashed, set this to true
* @throws PHPExcel_Exception
* @return PHPExcel_Worksheet
*/
public function protectCells($pRange = 'A1', $pPassword = '', $pAlreadyHashed = false)
{
// Uppercase coordinate
$pRange = strtoupper($pRange);
if (!$pAlreadyHashed) {
$pPassword = PHPExcel_Shared_PasswordHasher::hashPassword($pPassword);
}
$this->_protectedCells[$pRange] = $pPassword;
return $this;
}
示例2: setPassword
/**
* Set Password
*
* @param string $pValue
* @param boolean $pAlreadyHashed If the password has already been hashed, set this to true
*/
function setPassword($pValue = '', $pAlreadyHashed = false)
{
if (!$pAlreadyHashed) {
$pValue = PHPExcel_Shared_PasswordHasher::hashPassword($pValue);
}
$this->_password = $pValue;
}
示例3: setWorkbookPassword
/**
* Set WorkbookPassword
*
* @param string $pValue
* @param boolean $pAlreadyHashed If the password has already been hashed, set this to true
* @return PHPExcel_DocumentSecurity
*/
function setWorkbookPassword($pValue = '', $pAlreadyHashed = false)
{
if (!$pAlreadyHashed) {
$pValue = PHPExcel_Shared_PasswordHasher::hashPassword($pValue);
}
$this->_workbookPassword = $pValue;
return $this;
}