Swiftpack.co - grikshka/Swifty-Cryptor as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by grikshka.
grikshka/Swifty-Cryptor 1.0.6
Cryptor for iOS applications, that helps you securely encrypt/decrypt the data.
⭐️ 0
🕓 27 weeks ago
.package(url: "https://github.com/grikshka/Swifty-Cryptor.git", from: "1.0.6")


SwiftyCryptor is an encryption/decryption library for iOS applications, that helps you securely encrypt/decrypt the data.

SwiftyCryptor delivers a secure data encryption/decryption features contained inside the Cryptor class which provides an easy-to-use interface (defined in CryptorProtocol) for encrypting and decrypting the data.

SwiftyCryptor uses ChaCha20-Poly1305 cipher with a symmetric key of size 256 bits, that is securely stored in Keychain.



Supported Platforms

  • iOS

Supported Platforms Versions


iOS 13.0 +

Branches & Releases

  • main branch keeps the newest major - stable release.
  • stable branch keeps the newest minor - stable release.
  • beta branch keeps the newest minor - beta release.


Swift Package Manager

  • In Xcode, open your project and navigate to File → Swift Packages → Add Package Dependency.
  • Paste the package repository URL https://github.com/grikshka/Swifty-Cryptor and click Next.
  • For Rules, select Version - Up to Next Major - 1.0.0.
  • Select your target projects and click Finish.

Swift Package

.package(name: "SwiftyCryptor", url: "https://github.com/grikshka/Swifty-Cryptor/", from: "1.0.0")



import SwiftyCryptor

let cryptor: CryptorProtocol = Cryptor()
let secret = "secret"
do {
    // Encrypt plain text
    let encryptedSecret = try cryptor.encrypt(value: secret)
    // Decrypt encrypted text
    let decryptedSecret = try cryptor.decrypt(value: encryptedSecret)
} catch let error as CryptorError {
    // Handle CryptorError
} catch let error {
    // Fallback error


Stars: 0
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

27 weeks ago
  • Update documentation

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics