gopass

package module
v0.0.0-...-2914442 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2015 License: ISC Imports: 3 Imported by: 1

README

getpasswd in Go

Retrieve password from user terminal input without echo

Verified on BSD, Linux, and Windows.

Example:

package main

import "fmt"
import "github.com/howeyc/gopass"

func main() {
	fmt.Printf("Password: ")
	pass := gopass.GetPasswd() // Silent, for *'s use gopass.GetPasswdMasked()
    // Do something with pass
}

Caution: Multi-byte characters not supported!

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCh

func GetCh() byte

GetCh returns the char read from the terminal

func GetPasswd

func GetPasswd() []byte

GetPasswd returns the password read from the terminal without echoing input. The returned byte array does not include end-of-line characters.

func GetPasswdMasked

func GetPasswdMasked() []byte

GetPasswdMasked returns the password read from the terminal, echoing asterisks. The returned byte array does not include end-of-line characters.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL