Ejemplo n.º 1
0
 public function getCodeSalt()
 {
     if (!$this->codeSalt) {
         return $this->codeSalt = \Eva\Stdlib\String\Hash::uniqueHash();
     }
     return $this->codeSalt;
 }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
 public function getSalt()
 {
     $saltArray = \Eva\Stdlib\String\Hash::uniqueHash(true);
     array_pop($saltArray);
     return $this->salt ? $this->salt : ($this->salt = implode('', $saltArray));
 }
Ejemplo n.º 4
0
 /**
  * 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;
 }
Ejemplo n.º 5
0
 public function getUrlName()
 {
     if (!$this->urlName) {
         return $this->urlName = \Eva\Stdlib\String\Hash::uniqueHash();
     }
 }
Ejemplo n.º 6
0
 public function getGroupKey()
 {
     if (!$this->groupKey) {
         return $this->groupKey = \Eva\Stdlib\String\Hash::uniqueHash();
     }
 }
Ejemplo n.º 7
0
 public function getMessageHash()
 {
     if (!$this->messageHash) {
         return $this->messageHash = \Eva\Stdlib\String\Hash::uniqueHash();
     }
 }
Ejemplo n.º 8
0
 public function getFieldKey()
 {
     if (!$this->fieldKey) {
         return $this->fieldKey = \Eva\Stdlib\String\Hash::uniqueHash();
     }
 }