An open API service indexing awesome lists of open source software.

https://github.com/sentryco/secureinput

Secure input UI (macOS / iOS)
https://github.com/sentryco/secureinput

Last synced: 3 months ago
JSON representation

Secure input UI (macOS / iOS)

Awesome Lists containing this project

README

        

[![Tests](https://github.com/sentryco/SecureInput/actions/workflows/Tests.yml/badge.svg)](https://github.com/sentryco/SecureInput/actions/workflows/Tests.yml)
[![codebeat badge](https://codebeat.co/badges/2a87ea47-ffe8-4147-abdd-1d12a1fda9c5)](https://codebeat.co/projects/github-com-sentryco-secureinput-main)

# SecureInput

> Secure input UI (macOS / iOS)

**1. SecureInputView**

secureinputview

**2. PasswordTextField**

passwordtextfield

**3. SecTextContainer**

passwordtextfield

**4. SecureTextView**

passwordtextfield

## Description

This repository provides a collection of secure text input UI components, each with its unique features and trade-offs. They are designed to serve various purposes in applications that prioritize secure data handling. For more detailed information and the rationale behind each component, please refer to the code comments within the UI components.

## Features

1. `SecureInputView`: obfuscation-toggle, SecureText
2. `PasswordTextField`: obfuscation-toggle, SecureText and restrictor-callback
3. `SecTextContainer`: obfuscation-toggle, attribute and multiline (Not using SecureText and not editable)
4. `SecureTextView`: obfuscation-toggle, multiline (Not using SecureText)

## Instalation

Add this to XCode or SPM:

```swift
.package(url: "https://github.com/sentryco/SecureInput", branch: "main")
```

## Gotchas:
- Add your own style to components by making new TextFieldStyles and apply them to the view struct components. This way the new style overrides the internal TextFieldStyles

## Dependencies:
- [HybridColor](https://github.com/sentryco/HybridColor)
- [MockGen](https://github.com/sentryco/MockGen)
- [TextColorizer](https://github.com/sentryco/TextColorizer)

## Todo
- Add Attributed TextField that is editable
- Only use the MockGen dep for the testing scope?
- Make more high-level styling. use ViewBuilder + style struct with param drilling etc. Or use environment variable etc
- Remove MockGen as dep. Use private rand methods, use copilot etc
- Add debug flag. `public var isSecureInputDebug: Bool = false`