public function loadKeychain($keychainFile, $passphraseFile, $publicKeyFile)
	{
		if (!file_exists($keychainFile))
		{
			throw new \RuntimeException('Attempting to load non-existent keychain file');
		}

		$passphrase = $this->getPassphraseFromFile($passphraseFile, $publicKeyFile);

		$cleartext = openssl_decrypt(file_get_contents($keychainFile), $this->method, $passphrase, true, $this->iv);

		if ($cleartext === false)
		{
			throw new \RuntimeException("Failed to decrypt keychain file");
		}

		return $this->loadObject(json_decode($cleartext));
	}
public function loadKeychain($keychainFile, $passphraseFile, $publicKeyFile)
	{
		if (!file_exists($keychainFile))
		{
			throw new \RuntimeException('Attempting to load non-existent keychain file');
		}

		$passphrase = $this->getPassphraseFromFile($passphraseFile, $publicKeyFile);

		$cleartext = openssl_decrypt(file_get_contents($keychainFile), $this->method, $passphrase, true, $this->iv);

		if ($cleartext === false)
		{
			throw new \RuntimeException("Failed to decrypt keychain file");
		}

		return $this->loadObject(json_decode($cleartext));
	}
public function loadKeychain ( $ keychainFile , $ passphraseFile , $ publicKeyFile ) { if ( ! file_exists ( $ keychainFile ) ) { throw new \ RuntimeException ( 'Attempting to load non-existent keychain file' ) ; } $ passphrase = $ this -> getPassphraseFromFile ( $ passphraseFile , $ publicKeyFile ) ; $ cleartext = openssl_decrypt ( file_get_contents ( $ keychainFile ) , $ this -> method , $ passphrase , true , $ this -> iv ) ; if ( $ cleartext === false ) { throw new \ RuntimeException ( "Failed to decrypt keychain file" ) ; } return $ this -> loadObject ( json_decode ( $ cleartext ) ) ; }
Load a keychain file into this object.

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

@return  boolean  Result of loading the object.

@since   1.0
@throws  \RuntimeException
Load a keychain file into this object .