protected function persistKey($name, $password)
    {
        $hashedPassword = $this->hashService->hashPassword($password, $this->passwordHashingStrategy);
        $keyPathAndFilename = $this->getKeyPathAndFilename($name);
        if (!is_dir($this->getPath())) {
            Utility\Files::createDirectoryRecursively($this->getPath());
        }
        $result = file_put_contents($keyPathAndFilename, $hashedPassword);
        if ($result === false) {
            throw new SecurityException(sprintf('The key could not be stored ("%s").', $keyPathAndFilename), 1305812921);
        }
    }
protected function persistKey($name, $password)
    {
        $hashedPassword = $this->hashService->hashPassword($password, $this->passwordHashingStrategy);
        $keyPathAndFilename = $this->getKeyPathAndFilename($name);
        if (!is_dir($this->getPath())) {
            Utility\Files::createDirectoryRecursively($this->getPath());
        }
        $result = file_put_contents($keyPathAndFilename, $hashedPassword);
        if ($result === false) {
            throw new SecurityException(sprintf('The key could not be stored ("%s").', $keyPathAndFilename), 1305812921);
        }
    }
protected function persistKey ( $ name , $ password ) { $ hashedPassword = $ this -> hashService -> hashPassword ( $ password , $ this -> passwordHashingStrategy ) ; $ keyPathAndFilename = $ this -> getKeyPathAndFilename ( $ name ) ; if ( ! is_dir ( $ this -> getPath ( ) ) ) { Utility \ Files :: createDirectoryRecursively ( $ this -> getPath ( ) ) ; } $ result = file_put_contents ( $ keyPathAndFilename , $ hashedPassword ) ; if ( $ result === false ) { throw new SecurityException ( sprintf ( 'The key could not be stored ("%s").' , $ keyPathAndFilename ) , 1305812921 ) ; } }
Persists a key to the file system

@param string $name
@param string $password
@return void
@throws SecurityException
Persists a key to the file system