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.
Swift
iOS 13.0 +
main
branch keeps the newest major - stable release.stable
branch keeps the newest minor - stable release.beta
branch keeps the newest minor - beta release.https://github.com/grikshka/Swifty-Cryptor
and click Next.1.0.0
..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
}
link |
Stars: 0 |
Last commit: 1 week ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics