[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::decc

Title:DECC
Notice:General DEC C discussions
Moderator:TLE::D_SMITHNTE
Created:Fri Nov 13 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2212
Total number of notes:11045

2080.0. "crypt & getpass" by COPCLU::JORN (New European Champions...) Mon Feb 03 1997 07:47

Hi,


	Customer is running DEC C under OpenVMS and Unix. On Unix he finds two
	functions, crypt and getpass - but cannot find them on OpenVMS.

	Why is that ?

Jorn.













                         
T.RTitleUserPersonal
Name
DateLines
2080.1crypt() is a password encryption functionSUBPAC::FARICELLIMon Feb 03 1997 08:2918
   Becase they aren't there?  (It's a joke, son, it's a joke)

   The Digital Unix man pages for these two functions indicate that
   getpass() is a utility function that reads a string from the terminal
   without echo, and crypt() does DES encryption of the string.
   I assume the result is then compared to the user's password entry
   for confirmation.

   They probably aren't included in VMS because they probably are not part
   of any standard like POSIX. The password encryption function used in Unix
   is very specific to that operating system, so it's unlikely to be
   part of any os-independent standard.

   What exactly is the entent of using these functions? Does the programmer
   want the user to enter his/her system password and have it validated?

   -- John Faricelli
2080.2VMS wayTKTV20::HASHIMOTOWed Feb 05 1997 23:4330
I don't know about these functions at all, but on OpenVMS, I feel there are
some means which are almost equivalent to the functions.

For example...

To obtain strings from a terminal without echo, something like this might help.

getpass()
{
    /* Create a pass to the terminal */
    sys$assign(...);
    /* Read strings without echo */
    sys$qiow( IO$_READVBLK | IO$M_NOECHO );
}

To generate a value which represents the encrypted password, an API is
available on OpenVMS.

crypt()
{
    /*
       Generate a value from password and username
       ( might use a totally different algorithm from one on UNIX )
    */
    sys$hash_password(...);
}

Refere "System Service Reference Manual" for more details.

hope this helps.