Difference between revisions of "Ns crypt"

From AOLserver Wiki
Jump to navigation Jump to search
(Added see also: ns_sha1)
m
 
Line 1: Line 1:
Man page: http://aolserver.com/docs/tcl/ns_crypt.html
+
{{manpage|ns_crypt}}
 
 
----
 
  
 
'''NAME'''
 
'''NAME'''
Line 28: Line 26:
 
: [[ns_uuencode]], [[ns_uudecode]], [[ns_sha1]]
 
: [[ns_uuencode]], [[ns_uudecode]], [[ns_sha1]]
  
----
+
[[Category:Core Tcl API]]
 
 
[[Category Documentation]] - [[Category Core Tcl API]]
 

Latest revision as of 12:06, 3 December 2005

Man page: http://aolserver.com/man/4.0/tcl/ns_crypt.html


NAME

ns_crypt - Encrypt a string for use as a password

SYNOPSIS

ns_crypt key salt

DESCRIPTION

This command encrypts the key using the salt and returns the encrypted string. It uses the same algorithm as the Unix crypt command.
Normally, key is a password, of which the first 8 bytes are significant, and salt is one or two bytes used to encrypt the key. The string returned should always be 13 characters long and is usable as the password field in nscp and nsperm authentication.
The algorithm used is a one-way cipher, which means that the original plain-text key cannot be derived knowing the encrypted string alone. However, since only up to the first 8 bytes of key are significant, this means only a 64-bit key, which is reasonably attacked with modern computers with ordinary brute-force attacks today.

EXAMPLES

   % ns_crypt password qy
   qyz8eIFW3uJoo

SEE ALSO

ns_uuencode, ns_uudecode, ns_sha1