{"size": 1064, "ext": "scrbl", "max_stars_repo_path": "scribblings/get-pass.scrbl", "max_stars_repo_name": "smitchell556/get-pass", "max_stars_repo_stars_event_min_datetime": "2019-08-03T06:49:07.000Z", "max_stars_repo_stars_event_max_datetime": "2020-09-29T13:39:59.000Z", "max_issues_repo_path": "scribblings/get-pass.scrbl", "max_issues_repo_name": "smitchell556/get-pass", "max_issues_repo_issues_event_min_datetime": "2020-09-29T22:03:00.000Z", "max_issues_repo_issues_event_max_datetime": "2020-09-30T00:13:43.000Z", "max_forks_repo_path": "scribblings/get-pass.scrbl", "max_forks_repo_name": "smitchell556/get-pass", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 4, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 26.6, "max_line_length": 114, "alphanum_fraction": 0.6719924812}
#lang scribble/manual
@require[@for-label[get-pass
                    racket/base]]

@title{get-pass}
@author{Spencer Mitchell}

This package was inspired by Python's @hyperlink["https://docs.python.org/library/getpass.html" "getpass"] module.

@defmodule[get-pass]

@defproc[(get-pass [prompt string? "password: "]
                   [#:in in input-port? (current-input-port)]
                   [#:out out output-port? (current-output-port)])
         string?]

Displays @racket[prompt] on @racket[out]. Accepts input on @racket[in] without
echoing input.

Using the below code in get-a-password.rkt

@codeblock|{
#lang racket

(require get-pass)

(define pass (get-pass "What's your password? "))
(newline)
(displayln (string-append "Your password is " pass))
}|

will result in the following at the terminal if @code["1234"] is entered at the prompt.

@codeblock[#:keep-lang-line? #f]|{
#lang scribble/manual
$ racket get-a-password.rkt
What's your password?              # "1234" is entered at the prompt, but it is not displayed!
Your password is 1234
$ }|
