GetPassword
Provides functionality to actually, securely read a password from within IEx
or a Mix task.
Usage
# Get password with default prompt, returning a result-tuple
{:ok, pw} = GetPassword.get_password()
# Get password with a custom prompt, returning a result-tuple
{:ok, pw} = GetPassword.get_password("Password: ")
# Get password with default prompt, returning a password or raising an error
pw = GetPassword.get_password!()
# Get password with a custom prompt, returning a password or raising an error
pw = GetPassword.get_password!("Password: ")Installation
The package can be installed by adding get_password to your list of
dependencies in mix.exs:
def deps do
[
{:get_password, "~> 0.8.0"}
]
endThe docs can be found at https://hexdocs.pm/get_password.