本文整理汇总了PHP中PHPExcel_Shared_PasswordHasher::hashPassword方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPExcel_Shared_PasswordHasher::hashPassword方法的具体用法?PHP PHPExcel_Shared_PasswordHasher::hashPassword怎么用?PHP PHPExcel_Shared_PasswordHasher::hashPassword使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPExcel_Shared_PasswordHasher
的用法示例。
在下文中一共展示了PHPExcel_Shared_PasswordHasher::hashPassword方法的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;
}