Categorygithub.com/gokyle/readpass
modulepackage
0.0.0-20150812192153-d7e39d2c89f5
Repository: https://github.com/gokyle/readpass.git
Documentation: pkg.go.dev

# README

readpass

a Go package for reading passwords safely.

readpass provides an interface for reading passwords from the console securely. Thanks to code from Matt Silverlock, it no longer requires cgo.

An example program is included under in the example/example.go program; it reads a line of text and prints the length.

CAVEATS

  • Windows may or may not supported; I don't have the resources to test this.

LICENSE

Copyright (c) 2013 Kyle Isom [email protected]

Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

# Packages

This is a quick demo showing how to use ReadPass.

# Functions

DefaultPasswordPrompt is a simple (but echoing) password entry function that takes a prompt and reads the password.
DefaultPasswordPrompt is a simple (but echoing) password entry function that takes a prompt and reads the password.
No description provided by the author

# Variables

The PasswordPrompt function is the function that is called to prompt the user for a password.
The PasswordPromptBytes function is the same as PasswordPrompt, but returning a byte slice instead.