How to mask password when login?

Discussion of Common Lisp
Post Reply
wojtas
Posts: 2
Joined: Fri Jun 11, 2010 4:28 am

How to mask password when login?

Post by wojtas » Fri Jun 11, 2010 4:47 am

there is some function which change all signs typed by user to stars or dots? I found function "read-passwd" but it doesn't work or I don't know how to use it. I'm new in LISP.

Suroy
Posts: 46
Joined: Sat Dec 19, 2009 11:20 am

Re: How to mask password when login?

Post by Suroy » Fri Jun 11, 2010 6:13 pm

you need to provide more details on what are u doing, what library are u using.

Kohath
Posts: 61
Joined: Mon Jul 07, 2008 8:06 pm
Location: Toowoomba, Queensland, Australia
Contact:

Re: How to mask password when login?

Post by Kohath » Fri Jun 11, 2010 6:22 pm

There probably is, but not in the standard, but it would be in a web framework library I'd imagine. I don't know whether you're doing web programming though, so I suppose I should say "user interface" library. For example, a Google for "password textbox" led to http://msdn.microsoft.com/en-us/library/d3223ht2.aspx, and Googling "html password textbox" led to http://codepunk.hardwar.org.uk/ahtml24.htm. Hopefully that gets you on the right track. I'll let others suggest actual library functions though - GUIs are not my area (yet).

wojtas
Posts: 2
Joined: Fri Jun 11, 2010 4:28 am

Re: How to mask password when login?

Post by wojtas » Sat Jun 12, 2010 1:24 am

I don't want to create GUI yet. I want only to mask password in text interface in really simple instruction like: (setf pass (read)) and I was wondering if exist some function which I can use instead of (read).

Suroy
Posts: 46
Joined: Sat Dec 19, 2009 11:20 am

Re: How to mask password when login?

Post by Suroy » Sat Jun 12, 2010 7:14 am

read-passwd is for elisp, which is used in GNU emacs and is not common lisp (which i assume you want). if youre talking about masking a password when typing it in on a regular terminal, i dont know, in linux when you type in a password on the terminal nothing is shown, i do not know if it is possible to manipulate the terminal text by deleting/overriding user input.

Sort of off topic, but if your new to lisp, i would suggest two free online books

http://www.paulgraham.com/onlisp.html
http://www.gigamonkeys.com/book/

In terms of text editor, i would suggest gnu emacs + slime (emacs library plugin), though be prepared to be put off at first because you actually have to learn elisp a bit to customize and get used to emacs. If you are interested, i will post my .emacs file in order to help, its actually pretty easy.

In terms of gui libraries, all of them involve interfacing to foreign libraries through cffi (http://common-lisp.net/project/cffi/) or inline c.
Lets see, there are a couple, like

http://common-lisp.net/project/cl-gtk2/ ... ation.html
http://common-lisp.net/project/cells-gtk/ (not maintained anymore i think)
http://password-taxi.at/EQL

The last one is only for ECL lisp, which is a lisp in which you can directly embed c/c++, compile your code to dll, etc. See
http://ecls.sourceforge.net/
http://ecls.wikispaces.com/
http://ecls.sourceforge.net/new-manual/index.html

Post Reply