jakeheis / SwiftCLI

A powerful framework for developing CLIs in Swift
MIT License
861 stars 72 forks source link

Use `readpassphrase` instead of `getpass` #109

Open paulhimes opened 1 year ago

paulhimes commented 1 year ago

InputReader is using getpass to read secure values. Unfortunately, getpass is limited to 128 characters of input. The remaining input is silently truncated.

readpassphrase, on the other hand, can accept an arbitrary amount of input (up to a specified maximum). With readpassphrase you could choose a large character limit (e.g. 1024), or you could allow clients of SwiftCLI to specify a limit.