public function getCodeSalt() { if (!$this->codeSalt) { return $this->codeSalt = \Eva\Stdlib\String\Hash::uniqueHash(); } return $this->codeSalt; }
public function getUserIdFromHash() { $code = $this->getCode(); $bigInt = BigInteger::factory('bcmath'); $userId = \Eva\Stdlib\String\Hash::shortHash($code, true); $userId = $bigInt->sub($userId, '100000000'); return $userId; }
public function getSalt() { $saltArray = \Eva\Stdlib\String\Hash::uniqueHash(true); array_pop($saltArray); return $this->salt ? $this->salt : ($this->salt = implode('', $saltArray)); }
/** * Returns only the new filename without moving it * But existing files will be erased when the overwrite option is true * * @param string $value Full path of file to change * @param boolean $source Return internal informations * @return string The new filename which has been set * @throws Exception\InvalidArgumentException If the target file already exists. */ public function getNewName($value, $source = false, $fileinfo = null) { $rootpath = $this->rootpath; $path = $this->getPath(); $filename = \Eva\Stdlib\String\Hash::uniqueHash(); $fileextension = ''; if (isset($fileinfo['name'])) { $fileextension = '.' . $this->getExtension($fileinfo['name']); } $filepath = $rootpath . \DIRECTORY_SEPARATOR . $path . $filename . $fileextension; $this->prepareDirectoryStructure($filepath); return $filepath; }
public function getUrlName() { if (!$this->urlName) { return $this->urlName = \Eva\Stdlib\String\Hash::uniqueHash(); } }
public function getGroupKey() { if (!$this->groupKey) { return $this->groupKey = \Eva\Stdlib\String\Hash::uniqueHash(); } }
public function getMessageHash() { if (!$this->messageHash) { return $this->messageHash = \Eva\Stdlib\String\Hash::uniqueHash(); } }
public function getFieldKey() { if (!$this->fieldKey) { return $this->fieldKey = \Eva\Stdlib\String\Hash::uniqueHash(); } }