KeychainHelper

struct KeychainHelper

Undocumented

  • The service this helper is registered to

    Declaration

    Swift

    let service: String
  • Undocumented

    Declaration

    Swift

    init(service: String = Bundle.main.bundleIdentifier!) throws
  • Undocumented

    Declaration

    Swift

    func clearInKeychain(key: String) throws
  • Undocumented

    Declaration

    Swift

    func saveToKeychain(key: String, data: Data) throws
  • Undocumented

    Declaration

    Swift

    func loadFromKeychain(key: String) -> Data?
  • Generates and stores a new random database key

    Throws

    a KeychainError in case the generation or database save fails

    Declaration

    Swift

    func generateDatabaseKey() throws -> String

    Return Value

    the newly created key