setoCryptomatorCryptor is a powerful encryption library for iOS and macOS applications that provides seamless integration with Cryptomator. With setoCryptomatorCryptor, you can easily encrypt and decrypt files and folders using Cryptomator’s AES-256 encryption.
Key Features
- Integration with Cryptomator: Utilize the robust AES-256 encryption provided by Cryptomator in your apps.
- Easy Encryption and Decryption: Encrypt and decrypt individual files or entire folders effortlessly.
- Password Generation: Automatically generate strong, secure passwords for your encrypted data.
- Multi-platform Support: Works seamlessly on both iOS and macOS platforms.
- Swift and Objective-C Compatibility: Compatible with both Swift and Objective-C programming languages.
Getting Started
Installation
To install setoCryptomatorCryptor, follow these steps:
- Open your Xcode project.
- Navigate to “File” -> “Swift Packages” -> “Add Package Dependency”.
- Enter the repository URL:
https://github.com/setoceann/setoCryptomatorCryptor.git
- Choose the branch or version you want to use.
- Click “Next” and wait for Xcode to resolve the package.
- Add the library to your target(s) and click “Finish”.
Usage
Encryption
To encrypt a file or folder, follow these steps:
- Create an instance of
setoCryptomatorCryptor
. - Call the
encryptFile
orencryptFolder
method, passing the file or folder path and desired output path as parameters.
“`swift
// Example:
import setoCryptomatorCryptor
let cryptor = setoCryptomatorCryptor()
cryptor.encryptFile(from: “/path/to/file.txt”, to: “/path/to/encrypted/file.txt”)
cryptor.encryptFolder(from: “/path/to/folder”, to: “/path/to/encrypted/folder”)
“`
Decryption
To decrypt a file or folder, follow these steps:
- Create an instance of
setoCryptomatorCryptor
. - Call the
decryptFile
ordecryptFolder
method, passing the encrypted file or folder path and desired output path as parameters.
“`swift
// Example:
import setoCryptomatorCryptor
let cryptor = setoCryptomatorCryptor()
cryptor.decryptFile(from: “/path/to/encrypted/file.txt”, to: “/path/to/decrypted/file.txt”)
cryptor.decryptFolder(from: “/path/to/encrypted/folder”, to: “/path/to/decrypted/folder”)
“`
Password Generation
To generate a password using setoCryptomatorCryptor, simply call the generatePassword
method.
“`swift
// Example:
import setoCryptomatorCryptor
let cryptor = setoCryptomatorCryptor()
let password = cryptor.generatePassword()
“`
Compatibility
setoCryptomatorCryptor is compatible with the following platforms and languages:
- iOS
- macOS
- Swift
- Objective-C
By using setoCryptomatorCryptor, you can effortlessly incorporate Cryptomator’s AES-256 encryption into your iOS and macOS applications, ensuring the highest level of security for your sensitive data.