{"id":20128613,"url":"https://github.com/coreoffice/cryptooffice","last_synced_at":"2025-06-23T03:33:16.369Z","repository":{"id":54365749,"uuid":"267564205","full_name":"CoreOffice/CryptoOffice","owner":"CoreOffice","description":"Office Open XML (OOXML) formats (.xlsx, .docx, .pptx) decryption for Swift","archived":false,"fork":false,"pushed_at":"2023-02-15T20:58:47.000Z","size":95,"stargazers_count":36,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-03-14T22:38:55.163Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CoreOffice.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":"MaxDesiatov","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-05-28T10:48:20.000Z","updated_at":"2024-03-14T20:54:50.000Z","dependencies_parsed_at":"2024-01-16T10:09:29.995Z","dependency_job_id":null,"html_url":"https://github.com/CoreOffice/CryptoOffice","commit_stats":{"total_commits":29,"total_committers":2,"mean_commits":14.5,"dds":0.03448275862068961,"last_synced_commit":"4fc4834bf8df8e39cd5e4dfdf04b94cfe06b5257"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoreOffice%2FCryptoOffice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoreOffice%2FCryptoOffice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoreOffice%2FCryptoOffice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoreOffice%2FCryptoOffice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CoreOffice","download_url":"https://codeload.github.com/CoreOffice/CryptoOffice/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248063882,"owners_count":21041854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-11-13T20:28:19.608Z","updated_at":"2025-04-09T15:50:56.694Z","avatar_url":"https://github.com/CoreOffice.png","language":"Swift","funding_links":["https://github.com/sponsors/MaxDesiatov"],"categories":[],"sub_categories":[],"readme":"# CryptoOffice\n\n## Office Open XML (OOXML) formats (.xlsx, .docx, .pptx) decryption for Swift\n\nCryptoOffice is a library for decrypting Microsoft Office formats that utilise\n[ECMA-376 agile encryption](https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-offcrypto/cab78f5c-9c17-495e-bea9-032c63f02ad8). It should be used in conjuction\nwith libraries that allow parsing decrypted data, such as\n[CoreXLSX](https://github.com/CoreOffice/CoreXLSX).\n\n[Join our Discord](https://discord.gg/H6799jh) for any questions and friendly banter.\n\n## Example\n\nUsing CryptoOffice is easy:\n\n1. Add `import CryptoOffice` at the top of a relevant Swift source file.\n2. Use `CryptoOfficeFile(path: String)` to create a new instance with a path to your encrypted file.\n3. Call `decrypt(password: String)` on it to get decrypted data.\n4. Parse the decrypted data with a library appropriate for that format\n   ([CoreXLSX](https://github.com/CoreOffice/CoreXLSX) in this example).\n\n```swift\nimport CoreXLSX\nimport CryptoOffice\n\nlet encryptedFile = try CryptoOfficeFile(path: \"./categories.xlsx\")\nlet decryptedData = try encryptedFile.decrypt(password: \"pass\")\nlet xlsx = try XLSXFile(data: decryptedData)\n\nfor path in try xlsx.parseWorksheetPaths() {\n  let worksheet = try xlsx.parseWorksheet(at: path)\n  for row in worksheet.data?.rows ?? [] {\n    for c in row.cells {\n      print(c)\n    }\n  }\n}\n```\n\n## Requirements\n\n**Apple Platforms**\n\n- Xcode 12.4 or later\n- Swift 5.3 or later\n- iOS 13.0 / watchOS 6.0 / tvOS 13.0 / macOS 10.15 or later deployment targets\n\n**Linux**\n\n- Swift 5.3 or later\n\n## Installation\n\n### Swift Package Manager\n\n[Swift Package Manager](https://swift.org/package-manager/) is a tool for\nmanaging the distribution of Swift code. It’s integrated with the Swift build\nsystem to automate the process of downloading, compiling, and linking\ndependencies on all platforms.\n\nOnce you have your Swift package set up, adding `CryptoOffice` as a dependency is as\neasy as adding it to the `dependencies` value of your `Package.swift`.\n\n```swift\ndependencies: [\n  .package(url: \"https://github.com/CoreOffice/CryptoOffice.git\",\n           .upToNextMinor(from: \"0.1.1\"))\n]\n```\n\nIf you're using CryptoOffice in an app built with Xcode, you can also add it as a direct\ndependency [using Xcode's\nGUI](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app).\n\n## Contributing\n\n### Coding Style\n\nThis project uses [SwiftFormat](https://github.com/nicklockwood/SwiftFormat)\nand [SwiftLint](https://github.com/realm/SwiftLint) to\nenforce formatting and coding style. We encourage you to run SwiftFormat within\na local clone of the repository in whatever way works best for you either\nmanually or automatically via an [Xcode\nextension](https://github.com/nicklockwood/SwiftFormat#xcode-source-editor-extension),\n[build phase](https://github.com/nicklockwood/SwiftFormat#xcode-build-phase) or\n[git pre-commit\nhook](https://github.com/nicklockwood/SwiftFormat#git-pre-commit-hook) etc.\n\nTo guarantee that these tools run before you commit your changes on macOS, you're encouraged\nto run this once to set up the [pre-commit](https://pre-commit.com/) hook:\n\n```\nbrew bundle # installs SwiftLint, SwiftFormat and pre-commit\npre-commit install # installs pre-commit hook to run checks before you commit\n```\n\nRefer to [the pre-commit documentation page](https://pre-commit.com/) for more details\nand installation instructions for other platforms.\n\nSwiftFormat and SwiftLint also run on CI for every PR and thus a CI build can\nfail with incosistent formatting or style. We require CI builds to pass for all\nPRs before merging.\n\n### Code of Conduct\n\nThis project adheres to the [Contributor Covenant Code of\nConduct](https://github.com/CoreOffice/CryptoOffice/blob/master/CODE_OF_CONDUCT.md).\nBy participating, you are expected to uphold this code. Please report\nunacceptable behavior to coreoffice@desiatov.com.\n\n## License\n\nCryptoOffice is licensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this library except in compliance with the License.\nSee the\n[LICENSE](https://github.com/CoreOffice/CryptoOffice/blob/master/LICENSE) file\nfor more info.\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nCryptoOffice uses [swift-crypto](https://github.com/apple/swift-crypto/),\n[CryptoSwift](https://github.com/krzyzanowskim/CryptoSwift),\n[XMLCoder](https://github.com/MaxDesiatov/XMLCoder),\n[OLEKit](https://github.com/CoreOffice/OLEKit) and\n[ZIPFoundation](https://github.com/weichsel/ZIPFoundation). The latter is only\na dependency of CryptoOffice's test suite. Please check the respective projects\nfor their actual licensing information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreoffice%2Fcryptooffice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoreoffice%2Fcryptooffice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreoffice%2Fcryptooffice/lists"}