mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-03-05 09:24:49 +01:00
Structure
This commit is contained in:
3
SecretKit/SecureEnclave/SecureEnclave.swift
Normal file
3
SecretKit/SecureEnclave/SecureEnclave.swift
Normal file
@@ -0,0 +1,3 @@
|
||||
import Foundation
|
||||
|
||||
public enum SecureEnclave {}
|
||||
12
SecretKit/SecureEnclave/SecureEnclaveSecret.swift
Normal file
12
SecretKit/SecureEnclave/SecureEnclaveSecret.swift
Normal file
@@ -0,0 +1,12 @@
|
||||
import Foundation
|
||||
import Combine
|
||||
|
||||
extension SecureEnclave {
|
||||
|
||||
public struct Secret: SecretKit.Secret {
|
||||
|
||||
public let id: String
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
21
SecretKit/SecureEnclave/SecureEnclaveStore.swift
Normal file
21
SecretKit/SecureEnclave/SecureEnclaveStore.swift
Normal file
@@ -0,0 +1,21 @@
|
||||
import Foundation
|
||||
import Security
|
||||
|
||||
extension SecureEnclave {
|
||||
|
||||
public class Store: SecretStore {
|
||||
|
||||
@Published public fileprivate(set) var secrets: [Secret] = []
|
||||
|
||||
public init() {
|
||||
loadSecrets()
|
||||
}
|
||||
|
||||
fileprivate func loadSecrets() {
|
||||
let secret = Secret(id: "Test")
|
||||
secrets.append(secret)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user