From 75204148b0188003c440125d09cfad75ade6f494 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Sun, 11 Dec 2022 18:55:02 +0100 Subject: [PATCH] Defined the Keychainable protocol. --- .../Protocols/Keychainable.swift | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Libraries/Sources/KeychainStorage/Protocols/Keychainable.swift diff --git a/Libraries/Sources/KeychainStorage/Protocols/Keychainable.swift b/Libraries/Sources/KeychainStorage/Protocols/Keychainable.swift new file mode 100644 index 0000000..7b0b55c --- /dev/null +++ b/Libraries/Sources/KeychainStorage/Protocols/Keychainable.swift @@ -0,0 +1,27 @@ +// +// Keychainable.swift +// KeychainStorage +// +// Created by Javier Cicchelli on 11/12/2022. +// Copyright © 2022 Röck+Cöde. All rights reserved. +// + +import Foundation + +public protocol Keychainable { + func getData( + _ key: String, + ignoringAttributeSynchronizable: Bool + ) throws -> Data? + + func set( + _ value: Data, + key: String, + ignoringAttributeSynchronizable: Bool + ) throws + + func remove( + _ key: String, + ignoringAttributeSynchronizable: Bool + ) throws +}