secure-keys 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +25 -19
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9bb9a148f4ac19f7be01927996960b0020bbcacbcf7fb7b96638782103f966e1
|
4
|
+
data.tar.gz: 558cb14cab97a77d118ef1b21f4c45501eb98a078d05e02e1898181d9cf7c214
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df3de7c5d209a1b5d6f6193b1100d09ec5bfd74fb34ad67dd0612d31d72ba12d59b8ab2d340967ebea5db2090f92ad70d2e6bb3cba9638f99351cb404be5ad8c
|
7
|
+
data.tar.gz: 3f0b41426c81b87caa9326b81c92ef28bd508abae330813249c37ffe6cd43c1504d2310f77b463ae51d8079fe59b72a342d5e31ea9be64d5acba77db6a43e2c3
|
data/README.md
CHANGED
@@ -15,17 +15,20 @@ Utility to generate a `xcframework` for handling secure keys in iOS projects.
|
|
15
15
|
|
16
16
|
- Ruby 3.3.6 or higher
|
17
17
|
- iOS 13.0 or higher
|
18
|
+
- macOS 11.0 or higher
|
18
19
|
|
19
20
|
### Installation
|
20
21
|
|
21
22
|
You can install the `SecureKeys` utility using Homebrew using the following command:
|
22
23
|
|
23
24
|
```bash
|
24
|
-
brew tap
|
25
|
+
brew tap derian-cordoba/secure-keys
|
25
26
|
|
26
|
-
brew install
|
27
|
+
brew install derian-cordoba/secure-keys/secure-keys
|
27
28
|
```
|
28
29
|
|
30
|
+
For more details, you can visit the [homebrew-secure-keys](https://github.com/derian-cordoba/homebrew-secure-keys) repository.
|
31
|
+
|
29
32
|
Another way, you can install the `SecureKeys` utility using `gem` command:
|
30
33
|
|
31
34
|
```bash
|
@@ -44,6 +47,8 @@ Then, you can install the gem using:
|
|
44
47
|
bundle install
|
45
48
|
```
|
46
49
|
|
50
|
+
For more information about the gem, you can visit the [secure-keys](https://rubygems.org/gems/secure-keys) page.
|
51
|
+
|
47
52
|
## Usage
|
48
53
|
|
49
54
|
As first step, you need to determine the keys that you want to use in your iOS project. You can define the keys from Keychain or env variables.
|
@@ -186,27 +191,28 @@ The process when the script is executed is:
|
|
186
191
|
2. Create a temporary `Swift Package` in the `.secure-keys` directory.
|
187
192
|
3. Copy the `Keys` source code to the temporary `Swift Package`.
|
188
193
|
|
189
|
-
|
190
|
-
|
194
|
+
```swift
|
195
|
+
public enum SecureKey {
|
196
|
+
|
197
|
+
// MARK: - Cases
|
191
198
|
|
192
|
-
|
199
|
+
case apiKey
|
200
|
+
case someKey
|
201
|
+
case unknown
|
193
202
|
|
194
|
-
|
195
|
-
case someKey
|
196
|
-
case unknown
|
203
|
+
// MARK: - Properties
|
197
204
|
|
198
|
-
|
205
|
+
/// The decrypted value of the key
|
206
|
+
public var decryptedValue: String {
|
207
|
+
switch self {
|
208
|
+
case .apiKey: [1, 2, 4].decrypt(key: [248, 53, 26], iv: [148, 55, 47], tag: [119, 81])
|
209
|
+
case .someKey: [1, 2, 4].decrypt(key: [248, 53, 26], iv: [148, 55, 47], tag: [119, 81])
|
210
|
+
case .unknown: fatalError("Unknown key \(rawValue)")
|
211
|
+
}
|
212
|
+
}
|
213
|
+
}
|
214
|
+
```
|
199
215
|
|
200
|
-
/// The decrypted value of the key
|
201
|
-
public var decryptedValue: String {
|
202
|
-
switch self {
|
203
|
-
case .apiKey: [1, 2, 4].decrypt(key: [248, 53, 26], iv: [148, 55, 47], tag: [119, 81])
|
204
|
-
case .someKey: [1, 2, 4].decrypt(key: [248, 53, 26], iv: [148, 55, 47], tag: [119, 81])
|
205
|
-
case .unknown: fatalError("Unknown key \(rawValue)")
|
206
|
-
}
|
207
|
-
}
|
208
|
-
}
|
209
|
-
```
|
210
216
|
4. Generate the `SecureKeys.xcframework` using the temporary `Swift Package`.
|
211
217
|
5. Remove the temporary `Swift Package`.
|
212
218
|
|
data/lib/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
module SecureKeys
|
4
|
-
VERSION = '1.1.
|
4
|
+
VERSION = '1.1.1'.freeze
|
5
5
|
SUMMARY = 'Secure Keys is a simple tool for managing your secret keys'.freeze
|
6
6
|
DESCRIPTION = 'Secure Keys is a simple tool to manage your secret keys in your iOS project'.freeze
|
7
7
|
HOMEPAGE_URI = 'https://github.com/DerianCordobaPerez/secure-keys-generator'.freeze
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: secure-keys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derian Córdoba
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-02-
|
11
|
+
date: 2025-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base64
|