mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-04-10 03:07:22 +02:00
33 lines
711 B
Swift
33 lines
711 B
Swift
import Foundation
|
|
import SecretKit
|
|
|
|
extension SecureEnclave {
|
|
|
|
/// An implementation of Secret backed by the Secure Enclave.
|
|
public struct Secret: SecretKit.Secret {
|
|
|
|
public let id: String
|
|
public let name: String
|
|
public let publicKey: Data
|
|
public let attributes: Attributes
|
|
|
|
init(
|
|
id: String,
|
|
name: String,
|
|
publicKey: Data,
|
|
attributes: Attributes
|
|
) {
|
|
self.id = id
|
|
self.name = name
|
|
self.publicKey = publicKey
|
|
self.attributes = attributes
|
|
}
|
|
|
|
public static func ==(lhs: Self, rhs: Self) -> Bool {
|
|
lhs.id == rhs.id
|
|
}
|
|
|
|
}
|
|
|
|
}
|