getOption(self::OPTION_DATA_STORE)); openssl_pkey_export($resource, $privateKey); $publicKey = openssl_pkey_get_details($resource); return new KeyChain( PlatformKeyChainRepository::OPTION_DEFAULT_KEY_ID, PlatformKeyChainRepository::OPTION_DEFAULT_KEY_NAME, new Key($publicKey['key']), new Key($privateKey) ); } }