Password Input with getPass

April 26, 2016
By

(This article was first published on R – librestats, and kindly contributed to R-bloggers)

As of this morning, the getPass package version 0.1-1 is available on CRAN. The package offers a portable way to read user input without echoing the text, for the purposes of reading passwords. Some screenshots from various platforms are given below.

getPass

Implementation details are described in the package vignette. The short version is, if you use…

  • RStudio, input is handled by the rstudioapi package
  • command line (any OS), a custom reader written in C is used
  • RGui (Windows), then a tcltk reader is used.
  • R.app (Mac), then we attempt to use tcltk if it is available.

If none of these options is available for your platform/interface, then a backup version without masking can be used, via R’s readline(). I believe this supports just about everything, except emacs+ess, which I don’t think can be supported (if you have any ideas, please let me know). If you discover any problems, please file an issue.

To leave a comment for the author, please follow the link and comment on their blog: R – librestats.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)