public function shutdownObject()
    {
        if ($this->saveKeysOnShutdown === false) {
            return;
        }

        $temporaryKeystorePathAndFilename = $this->keystorePathAndFilename . Utility\Algorithms::generateRandomString(13) . '.temp';
        $result = file_put_contents($temporaryKeystorePathAndFilename, serialize($this->keys));

        if ($result === false) {
            throw new SecurityException('The temporary keystore file "' . $temporaryKeystorePathAndFilename . '" could not be written.', 1305812921);
        }
        $i = 0;
        while (($result = rename($temporaryKeystorePathAndFilename, $this->keystorePathAndFilename)) === false && $i < 5) {
            $i++;
        }
        if ($result === false) {
            throw new SecurityException('The keystore file "' . $this->keystorePathAndFilename . '" could not be written.', 1305812938);
        }
    }
public function shutdownObject()
    {
        if ($this->saveKeysOnShutdown === false) {
            return;
        }

        $temporaryKeystorePathAndFilename = $this->keystorePathAndFilename . Utility\Algorithms::generateRandomString(13) . '.temp';
        $result = file_put_contents($temporaryKeystorePathAndFilename, serialize($this->keys));

        if ($result === false) {
            throw new SecurityException('The temporary keystore file "' . $temporaryKeystorePathAndFilename . '" could not be written.', 1305812921);
        }
        $i = 0;
        while (($result = rename($temporaryKeystorePathAndFilename, $this->keystorePathAndFilename)) === false && $i < 5) {
            $i++;
        }
        if ($result === false) {
            throw new SecurityException('The keystore file "' . $this->keystorePathAndFilename . '" could not be written.', 1305812938);
        }
    }
public function shutdownObject ( ) { if ( $ this -> saveKeysOnShutdown === false ) { return ; } $ temporaryKeystorePathAndFilename = $ this -> keystorePathAndFilename . Utility \ Algorithms :: generateRandomString ( 13 ) . '.temp' ; $ result = file_put_contents ( $ temporaryKeystorePathAndFilename , serialize ( $ this -> keys ) ) ; if ( $ result === false ) { throw new SecurityException ( 'The temporary keystore file "' . $ temporaryKeystorePathAndFilename . '" could not be written.' , 1305812921 ) ; } $ i = 0 ; while ( ( $ result = rename ( $ temporaryKeystorePathAndFilename , $ this -> keystorePathAndFilename ) ) === false && $ i < 5 ) { $ i ++ ; } if ( $ result === false ) { throw new SecurityException ( 'The keystore file "' . $ this -> keystorePathAndFilename . '" could not be written.' , 1305812938 ) ; } }
Stores the keys array in the keystore file

@return void
@throws SecurityException
Stores the keys array in the keystore file