   /// - parameter accessibility: accessibility to use when setting the keychain
   ///   item.
   /// - throws: Throws an error if the save failed.
-  public func set(_ value: Data, forKey key: String, accessibility: Accessibility = .default) throws {
+  public func set(_ value: Data, forKey key: String, accessibility givenAccessibility: Accessibility? = nil) throws {
+    let accessibility = givenAccessibility ?? defaultAccessibility
     var dictionary = try queryDictionary(forKey: key, accessibility: accessibility)
     dictionary[SecValueData] = value
     dictionary[SecAttrAccessible] = accessibility.keychainAttrValue

  /// - parameter accessibility:  accessibility to use when setting the keychain
  ///   item.
  /// - throws: Throws an error if the save failed.
  public func set(_ value: NSCoding, forKey key: String, accessibility: Accessibility = .default) throws {
    let data = NSKeyedArchiver.archivedData(withRootObject: value)
    try set(data, forKey: key, accessibility: accessibility)
  }

  ///   identify all keys stored using this keychain wrapper instance.
  /// - parameter accessGroup: Optional unique AccessGroup for this instance. Use a
  ///   matching AccessGroup between applications to allow shared keychain access.
  public init(serviceName: String, accessGroup: String? = nil, defaultAccessibility: Accessibility = .whenUnlocked) {
    self.serviceName = serviceName
    self.accessGroup = accessGroup
    self.defaultAccessibility = defaultAccessibility
  }
  
  
