Skip to content
Snippets Groups Projects
Select Git revision
  • 50a0d16c7789ff0cfd8d08a911df9be1ce847c90
  • main default protected
  • dev protected
  • hotfixes-oct-2022
  • refactor/avatar-cell
  • 1.1.5
  • 1.1.4
  • 1.1.3
  • 1.1
  • 1.0.8
  • 1.0.7
  • 1.0.6
12 results

LaunchViewModel+Messenger.swift

Blame
  • PasswordGenerator.swift 551 B
    import Bindings
    
    public struct PasswordGenerator {
      public var run: (Int) -> Data
    
      public func callAsFunction(numBytes: Int = 32) -> Data {
        run(numBytes)
      }
    }
    
    extension PasswordGenerator {
      public static let live = PasswordGenerator { numBytes in
        guard let secret = BindingsGenerateSecret(numBytes) else {
          fatalError("BindingsGenerateSecret returned `nil`")
        }
        return secret
      }
    }
    
    #if DEBUG
    extension PasswordGenerator {
      public static let failing = PasswordGenerator { _ in
        fatalError("Not implemented")
      }
    }
    #endif