//
//  GuiAppBiokeyStorage.swift
//  TrustBuilderMfaSampleApp
//
//  Created by Ludovic Lefevre on 29/05/2023.
//

import Foundation

public class BioKeyStorage {
    private let labelBio = "tb_bio"
    
    func save(tknAlias : String, privateKey : Data) throws {
        try KeychainService().saveItemBio(privateKey: privateKey, itemId: tknAlias, label: labelBio)
    }
    
    func get(tknAlias : String) async throws -> String {
        return try await KeychainService().GetItemBio(itemId: tknAlias, label: labelBio,
                                            prompt: "Access sample keychain entry")!
        }
}
