{"id":13800537,"url":"https://github.com/sketchytech/Swiftography","last_synced_at":"2025-05-13T09:31:44.751Z","repository":{"id":30888968,"uuid":"34446681","full_name":"sketchytech/Swiftography","owner":"sketchytech","description":"Standard cryptographic algorithms in a Swift Playground","archived":false,"fork":false,"pushed_at":"2017-11-10T12:42:41.000Z","size":280,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-06T20:24:24.627Z","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/sketchytech.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}},"created_at":"2015-04-23T09:24:58.000Z","updated_at":"2022-07-06T08:55:11.000Z","dependencies_parsed_at":"2022-09-09T17:00:59.729Z","dependency_job_id":null,"html_url":"https://github.com/sketchytech/Swiftography","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sketchytech%2FSwiftography","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sketchytech%2FSwiftography/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sketchytech%2FSwiftography/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sketchytech%2FSwiftography/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sketchytech","download_url":"https://codeload.github.com/sketchytech/Swiftography/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253913179,"owners_count":21983270,"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-08-04T00:01:13.533Z","updated_at":"2025-05-13T09:31:42.685Z","avatar_url":"https://github.com/sketchytech.png","language":"Swift","funding_links":[],"categories":["Theoretical Computer Science"],"sub_categories":["Algorithms and Data Structures"],"readme":"# Swiftography\nStandard cryptographic algorithms in a Swift Playground\n## CryptoJS\nSwiftorgraphy leverages the [CryptoJS](https://code.google.com/p/crypto-js/) repository via JavaScriptCore framework. It is featured in a playground here but can transfered to a regular app as well.\n## IDPF font obfuscation added\nFont obfuscation in line with [IDPF EPUB standard](http://www.idpf.org/epub/30/spec/epub30-ocf.html#font-obfuscation) works to obfuscate and de-obfuscate fonts.\n## Example\nAs you'll see in the playground all is self-explanatory and easy to use, simply write:\n```\nlet str = \"Hello Swift!\"\n\nCrypto.sha1(str) // \"9c602d242f2ecedff6dd3703576e1fa39aa25706\"\nCrypto.sha224(str) // \"807db20e8e9f401114c7d542609bda14b8ebcb723f662cc14602ee96\"\nCrypto.sha256(str) // \"bf452d84b203dfe67b45f1d73be4866f2552f8414eff79452375a467f02e30d7\"\nCrypto.sha384(str) // \"f1a8c74940995d34dc90b7972c50c36c1a5e9137c723aeacf0e11d527f63f487f96707c339e58e9a210cc2084243b028\"\nCrypto.sha512(str) // \"636130e3878c8c47ee266849d8c8754481dae9018a32f74ac13a7773390dfee02e7472fb7caa1c1a33e846bcc16204e895ddd11dd8175e87f3b2451b7326c03f\"\nCrypto.sha3(str) // \"f23a824632ba5a27fc2d7bf3683032acb27862eb49d7bce825c75f86a52a2b123aab3c76035fab5a5aad01b0cc0c495b2140198260a0e7441ba9235f26795338\"\nCrypto.md5(str) // \"ba135edf6168271dfe4ed79e719e8188\"\nCrypto.ripemd160(str) // \"1c87b79ebcb075d87242486fe0e8e43b9ccdd311\"\n```\nIn addition to common crypotography algorithms, repo now includes IDPF EPUB standard font obfuscation.\n```\n// IDPF font obfuscation\nif let url = NSBundle.mainBundle().URLForResource(\"Lobster-Regular\", withExtension: \"ttf\"),\n    source = NSData(contentsOfURL: url) {\n        // obfuscate font using IDPF approach\n        let obFont = obfuscateFontIDPF(source,\"urn:uuid:9A6376C9-9E0A-4BA4-87CE-667AA91A70DE\")\n        obFont == source // false, font has been obfuscated\n        obfuscateFontIDPF(obFont,\"urn:uuid:9A6376C9-9E0A-4BA4-87CE-667AA91A70DE\") == source // true, font has been obfuscated back to original state\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsketchytech%2FSwiftography","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsketchytech%2FSwiftography","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsketchytech%2FSwiftography/lists"}