You are here

function PHPExcel_DocumentSecurity::setWorkbookPassword in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/DocumentSecurity.php \PHPExcel_DocumentSecurity::setWorkbookPassword()

Set WorkbookPassword

Parameters

string $pValue:

boolean $pAlreadyHashed If the password has already been hashed, set this to true:

Return value

PHPExcel_DocumentSecurity

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/DocumentSecurity.php, line 197

Class

PHPExcel_DocumentSecurity
PHPExcel_DocumentSecurity

Code

function setWorkbookPassword($pValue = '', $pAlreadyHashed = false) {
  if (!$pAlreadyHashed) {
    $pValue = PHPExcel_Shared_PasswordHasher::hashPassword($pValue);
  }
  $this->_workbookPassword = $pValue;
  return $this;
}