You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a cryptor by providing a masterkey and a scheme (e.g., `.sivGcm`).
125
125
126
126
```swift
127
127
let masterkey =...
128
-
let cryptor =Cryptor(masterkey: masterkey)
128
+
let scheme =...
129
+
let cryptor =Cryptor(masterkey: masterkey, scheme: scheme)
129
130
```
130
131
132
+
Make sure that the data you're working with is compatible with the provided scheme.
133
+
131
134
#### Path Encryption and Decryption
132
135
133
136
Encrypt the directory ID in order to determine the encrypted directory URL.
@@ -178,8 +181,9 @@ Please read our [contribution guide](.github/CONTRIBUTING.md), if you would like
178
181
179
182
In general, the following preference is used to choose the implementation of cryptographic primitives:
180
183
181
-
1. Apple Swift Crypto (HMAC)
182
-
2. Apple CommonCrypto (AES-CTR, RFC 3394 Key Derivation)
184
+
1. Apple CryptoKit (AES-GCM)
185
+
2. Apple Swift Crypto (HMAC)
186
+
3. Apple CommonCrypto (AES-CTR, RFC 3394 Key Derivation)
183
187
184
188
This project uses [SwiftFormat](https://github.com/nicklockwood/SwiftFormat) and [SwiftLint](https://github.com/realm/SwiftLint) to enforce code style and conventions. Install these tools if you haven't already.
0 commit comments