{"id":43320360,"url":"https://github.com/xendit/xenissuing-ios","last_synced_at":"2026-02-01T22:33:11.681Z","repository":{"id":51362238,"uuid":"520384483","full_name":"xendit/xenissuing-ios","owner":"xendit","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-01T15:18:33.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-10-01T17:27:45.155Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xendit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-08-02T06:49:04.000Z","updated_at":"2025-10-01T15:18:37.000Z","dependencies_parsed_at":"2025-10-02T14:00:51.051Z","dependency_job_id":null,"html_url":"https://github.com/xendit/xenissuing-ios","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/xendit/xenissuing-ios","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fxenissuing-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fxenissuing-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fxenissuing-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fxenissuing-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xendit","download_url":"https://codeload.github.com/xendit/xenissuing-ios/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fxenissuing-ios/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28993253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T22:01:47.507Z","status":"ssl_error","status_checked_at":"2026-02-01T21:58:37.335Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-01T22:33:11.560Z","updated_at":"2026-02-01T22:33:11.657Z","avatar_url":"https://github.com/xendit.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Swift support](https://img.shields.io/badge/Swift-5.3%20%7C%205.4%20%7C%205.5%20%7C%205.6-brightgreen.svg?style=flat\u0026colorA=28a745\u0026\u0026colorB=4E4E4E)\n[![Swift Package Manager compatible](https://img.shields.io/badge/Swift_Package_Manager-compatible-brightgreen.svg?style=flat\u0026colorA=28a745\u0026\u0026colorB=4E4E4E)](https://github.com/apple/swift-package-manager)\n# Xenissuing \n\nThe XenIssuing SDK provides a secure way to handle sensitive operations in your iOS applications. This SDK includes:\n- **SecureSession**: A module that ensures encrypted communication between your application and Xendit's services.\n\n## Prerequisites\n\n- iOS 10.15 or later\n- Swift 5.0 or later\n- A public key from Xendit (Contact Xendit to obtain this)\n\n## Usage\n\n### Creating a Secure Session\n\n```swift\nimport Xenissuing\n\nlet publicKey = \"\"\"\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA... // Your RSA public key without header/footer\n\"\"\"\n\ndo {\n    // Create secure session\n    let secureSession = try Xenissuing.createSecureSession(\n        xenditPublicKeyData: Data(base64Encoded: publicKey)!\n    )\n    \n    // Get session ID for API authentication\n    let sessionId = secureSession.getSessionId().base64EncodedString()\n    \n    // Important: URL encode the session ID as it will be used as a URL parameter\n    let allowedCharacters = CharacterSet(charactersIn: \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\")\n    let encodedSessionId = sessionId.addingPercentEncoding(withAllowedCharacters: allowedCharacters) ?? \"\"\n    \n    // Use encodedSessionId in API requests\n    let apiUrl = \"https://api.xendit.co/card_issuing/cards/{cardId}/pan?session_id=\\(encodedSessionId)\"\n} catch {\n    print(\"Error:\", error)\n}\n```\n\n### Public Key Format\n\nThe public key should be:\n- An RSA public key provided by Xendit\n- Without the \"-----BEGIN PUBLIC KEY-----\" and \"-----END PUBLIC KEY-----\" headers\n- A single continuous string (can use Swift multi-line string format for readability)\n\nExample format:\n```swift\nlet publicKey = \"\"\"\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...\n\"\"\"\n```\n\n### Session ID Usage\n\nThe session ID must be URL encoded because:\n- It contains base64 characters that may include '+' and '/'\n- It will be used as a URL parameter in API requests\n- URL encoding ensures safe transmission of the session ID in HTTP requests\n\nExample API usage:\n```swift\nlet apiUrl = \"https://api.xendit.co/card_issuing/cards/\\(cardId)/pan?session_id=\\(encodedSessionId)\"\n```\n\n### Decrypting Card Data\n\nWhen you receive encrypted card data from Xendit's API:\n\n```swift\ndo {\n    let decryptedData = try secureSession.decryptCardData(\n        secret: encryptedCardData, // Base64 encoded encrypted data\n        iv: initializationVector   // Base64 encoded IV\n    )\n    \n    // Process the decrypted card data\n    let cardInfo = String(data: decryptedData, encoding: .utf8)\n} catch {\n    print(\"Decryption error:\", error)\n}\n```\n\n## Support\n\nFor issues, questions, or assistance, please reach out to the XenIssuing team at Xendit.\n- Email: xenissuing@xendit.co\n- API Documentation: https://developers.xendit.co\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxendit%2Fxenissuing-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxendit%2Fxenissuing-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxendit%2Fxenissuing-ios/lists"}