public function saveKeychain($keychainFile, $passphraseFile, $publicKeyFile)
	{
		$passphrase = $this->getPassphraseFromFile($passphraseFile, $publicKeyFile);
		$data = $this->toString('JSON');

		$encrypted = @openssl_encrypt($data, $this->method, $passphrase, true, $this->iv);

		if ($encrypted === false)
		{
			throw new \RuntimeException('Unable to encrypt keychain');
		}

		return file_put_contents($keychainFile, $encrypted);
	}
public function saveKeychain($keychainFile, $passphraseFile, $publicKeyFile)
	{
		$passphrase = $this->getPassphraseFromFile($passphraseFile, $publicKeyFile);
		$data = $this->toString('JSON');

		$encrypted = @openssl_encrypt($data, $this->method, $passphrase, true, $this->iv);

		if ($encrypted === false)
		{
			throw new \RuntimeException('Unable to encrypt keychain');
		}

		return file_put_contents($keychainFile, $encrypted);
	}
public function saveKeychain ( $ keychainFile , $ passphraseFile , $ publicKeyFile ) { $ passphrase = $ this -> getPassphraseFromFile ( $ passphraseFile , $ publicKeyFile ) ; $ data = $ this -> toString ( 'JSON' ) ; $ encrypted = @ openssl_encrypt ( $ data , $ this -> method , $ passphrase , true , $ this -> iv ) ; if ( $ encrypted === false ) { throw new \ RuntimeException ( 'Unable to encrypt keychain' ) ; } return file_put_contents ( $ keychainFile , $ encrypted ) ; }
Save this keychain to a file.

@param   string  $keychainFile    The path to the keychain file.
@param   string  $passphraseFile  The path to the passphrase file to encrypt the keychain.
@param   string  $publicKeyFile   The file containing the public key to decrypt the passphrase file.

@return  boolean  Result of storing the file.

@since   1.0
@throws  \RuntimeException
Save this keychain to a file .