{"id":13536890,"url":"https://github.com/whyoleg/cryptography-kotlin","last_synced_at":"2025-04-09T10:07:17.061Z","repository":{"id":65535549,"uuid":"492907371","full_name":"whyoleg/cryptography-kotlin","owner":"whyoleg","description":"Kotlin Multiplatform cryptography / crypto library","archived":false,"fork":false,"pushed_at":"2024-05-22T21:43:46.000Z","size":1845,"stargazers_count":233,"open_issues_count":13,"forks_count":10,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-05-22T21:51:34.949Z","etag":null,"topics":["aes","crypto","cryptography","ecdsa","encryption","kmp","kotlin","kotlin-multiplatform","multiplatform","rsa","signature"],"latest_commit_sha":null,"homepage":"https://whyoleg.github.io/cryptography-kotlin/","language":"Kotlin","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/whyoleg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2022-05-16T16:04:55.000Z","updated_at":"2024-06-29T18:36:32.498Z","dependencies_parsed_at":"2023-02-15T13:15:52.942Z","dependency_job_id":"087f2488-d7ac-4cdf-b1c9-8eb76a550a93","html_url":"https://github.com/whyoleg/cryptography-kotlin","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whyoleg%2Fcryptography-kotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whyoleg%2Fcryptography-kotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whyoleg%2Fcryptography-kotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whyoleg%2Fcryptography-kotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whyoleg","download_url":"https://codeload.github.com/whyoleg/cryptography-kotlin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248018060,"owners_count":21034048,"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":["aes","crypto","cryptography","ecdsa","encryption","kmp","kotlin","kotlin-multiplatform","multiplatform","rsa","signature"],"created_at":"2024-08-01T09:00:51.313Z","updated_at":"2025-04-09T10:07:17.039Z","avatar_url":"https://github.com/whyoleg.png","language":"Kotlin","funding_links":[],"categories":["Libraries","Multiplatform"],"sub_categories":["Utility","🔑 Crypto","Android samples"],"readme":"# cryptography-kotlin\n\nType-safe Multiplatform cryptography library for Kotlin\n\n```kotlin\nCryptographyProvider.Default\n    .get(SHA512)\n    .hasher()\n    .hash(\"Kotlin is Awesome\".encodeToByteArray())\n```\n\nDetailed documentation can be found on\n[project website](https://whyoleg.github.io/cryptography-kotlin/) as well as in\n[API reference](https://whyoleg.github.io/cryptography-kotlin/api/)\n\n## Overview\n\ncryptography-kotlin provides multiplatform API which consists of multiple components:\n\n* [Secure random][Secure random] with [kotlin.Random][kotlin.Random] like API which can be used independently of other modules\n* common API to use different cryptography operations,\n  like [ciphers][ciphers], [digests][digests], [signatures][signatures], [key derivation][key derivation], [Key agreement][Key agreement]\n* multiple algorithms definitions, like [AES][AES], [RSA][RSA], [ECDSA][ECDSA], [ECDH][ECDH], [SHA][SHA256], [HMAC][HMAC]\n  and [PBKDF2][PBKDF2]\n* multiple cryptography [providers][providers], like [OpenSSL][OpenSSL], [WebCrypto][WebCrypto] and [JDK][JDK]\n\nThe library doesn't implement any cryptography algorithm on its own, but wraps well-known future-proof solutions\nlike [OpenSSL 3.x](https://www.openssl.org), [WebCrypto](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API)\nor [JCA](https://docs.oracle.com/en/java/javase/17/security/java-cryptography-architecture-jca-reference-guide.html)\nwith type-safe multiplatform API providing uniform experience with aligned default behavior,\nand same expected results using identical parameters while allowing to use platform-specific capabilities.\nFor supported algorithms, primitives and targets, please consult [Providers documentation][providers]\n\n## Using in your projects\n\nMake sure that you use Kotlin 2.0.20+.\nUsing an earlier Kotlin version could still work, but not tested.  \nAdditionally, it's possible to use [BOM][BOM] or [Gradle version catalog][Gradle version catalog] to add dependencies easier.\nThe library is published to Maven Central, so make sure, that it’s added to repositories.\n\n```kotlin\nkotlin {\n    sourceSets {\n        commonMain.dependencies {\n            implementation(\"dev.whyoleg.cryptography:cryptography-core:0.4.0\")\n        }\n        // or androidMain\n        jvmMain.dependencies {\n            implementation(\"dev.whyoleg.cryptography:cryptography-provider-jdk:0.4.0\")\n        }\n        appleMain.dependencies {\n            implementation(\"dev.whyoleg.cryptography:cryptography-provider-apple:0.4.0\")\n            // or openssl3 provider with better algorithms coverage and other native targets support  \n            // implementation(\"dev.whyoleg.cryptography:cryptography-provider-openssl3-prebuilt:0.4.0\")\n        }\n        wasmJsMain.dependencies {\n            implementation(\"dev.whyoleg.cryptography:cryptography-provider-webcrypto:0.4.0\")\n        }\n    }\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eSnapshots of the development version are available in Sonatype's snapshot repository.\u003c/summary\u003e\n\u003cp\u003e\n\n```kotlin\nrepositories {\n    maven(\"https://s01.oss.sonatype.org/content/repositories/snapshots/\")\n}\ndependencies {\n    implementation(\"dev.whyoleg.cryptography:cryptography-core:0.4.1-SNAPSHOT\")\n}\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n## Bugs and Feedback\n\nFor bugs, questions and discussions, please use the [GitHub Issues](https://github.com/whyoleg/cryptography-kotlin/issues)\n\n## License\n\n    Copyright 2023 Oleg Yukhnevich.\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n[Secure random]: https://whyoleg.github.io/cryptography-kotlin/modules/cryptography-random\n\n[kotlin.Random]: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.random/-random/\n\n[ciphers]: https://whyoleg.github.io/cryptography-kotlin/api/cryptography-core/dev.whyoleg.cryptography.operations/-cipher/index.html\n\n[digests]: https://whyoleg.github.io/cryptography-kotlin/api/cryptography-core/dev.whyoleg.cryptography.operations/-hasher/index.html\n\n[signatures]: https://whyoleg.github.io/cryptography-kotlin/api/cryptography-core/dev.whyoleg.cryptography.operations/-signature-generator/index.html\n\n[key derivation]: https://whyoleg.github.io/cryptography-kotlin/api/cryptography-core/dev.whyoleg.cryptography.operations/-secret-derivation/index.html\n\n[Key agreement]: https://whyoleg.github.io/cryptography-kotlin/api/cryptography-core/dev.whyoleg.cryptography.operations/-shared-secret-derivation/index.html\n\n[SHA256]: https://whyoleg.github.io/cryptography-kotlin/api/cryptography-core/dev.whyoleg.cryptography.algorithms/-s-h-a256/index.html\n\n[AES]: https://whyoleg.github.io/cryptography-kotlin/api/cryptography-core/dev.whyoleg.cryptography.algorithms/-a-e-s/index.html\n\n[HMAC]: https://whyoleg.github.io/cryptography-kotlin/api/cryptography-core/dev.whyoleg.cryptography.algorithms/-h-m-a-c/index.html\n\n[RSA]: https://whyoleg.github.io/cryptography-kotlin/api/cryptography-core/dev.whyoleg.cryptography.algorithms/-r-s-a/index.html\n\n[ECDSA]: https://whyoleg.github.io/cryptography-kotlin/api/cryptography-core/dev.whyoleg.cryptography.algorithms/-e-c-d-s-a/index.html\n\n[ECDH]: https://whyoleg.github.io/cryptography-kotlin/api/cryptography-core/dev.whyoleg.cryptography.algorithms/-e-c-d-h/index.html\n\n[PBKDF2]: https://whyoleg.github.io/cryptography-kotlin/api/cryptography-core/dev.whyoleg.cryptography.algorithms/-p-b-k-d-f2/index.html\n\n[HKDF]: https://whyoleg.github.io/cryptography-kotlin/api/cryptography-core/dev.whyoleg.cryptography.algorithms/-h-k-d-f/index.html\n\n[providers]: https://whyoleg.github.io/cryptography-kotlin/providers/\n\n[OpenSSL]: https://whyoleg.github.io/cryptography-kotlin/modules/cryptography-provider-openssl3/\n\n[WebCrypto]: https://whyoleg.github.io/cryptography-kotlin/modules/cryptography-provider-webcrypto/\n\n[JDK]: https://whyoleg.github.io/cryptography-kotlin/modules/cryptography-provider-jdk/\n\n[BOM]: https://whyoleg.github.io/cryptography-kotlin/bom/\n\n[Gradle version catalog]: https://whyoleg.github.io/cryptography-kotlin/gradle-version-catalog/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhyoleg%2Fcryptography-kotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhyoleg%2Fcryptography-kotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhyoleg%2Fcryptography-kotlin/lists"}