]> gitweb.factorcode.org Git - factor.git/blob - extra/crypto/passwd-md5/passwd-md5-docs.factor
3b4c7df6dfe220edfbda815843b5593a577c52df
[factor.git] / extra / crypto / passwd-md5 / passwd-md5-docs.factor
1 ! Copyright (C) 2008 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: help.markup help.syntax io.streams.string kernel
4 strings ;
5 IN: crypto.passwd-md5
6
7 HELP: authenticate-password
8 { $values
9      { "shadow" string } { "password" string }
10      { "?" boolean } }
11 { $description "Encodes the provided password and compares it to the encoded password entry from a shadowed password file." } ;
12
13 HELP: parse-shadow-password
14 { $values
15      { "string" string }
16      { "magic" string } { "salt" string } { "password" string } }
17 { $description "Splits a shadowed password entry into a magic string, a salt, and an encoded password string." } ;
18
19 HELP: passwd-md5
20 { $values
21      { "magic" string } { "salt" string } { "password" string }
22      { "bytes" "an md5-shadowed password entry" } }
23 { $description "Encodes the password with the given magic string and salt to an MD5-shadow password entry." } ;
24
25 ARTICLE: "crypto.passwd-md5" "MD5 shadow passwords"
26 "The " { $vocab-link "crypto.passwd-md5" } " vocabulary can encode passwords for use in an MD5 shadow password file." $nl
27
28 "Encoding a password:"
29 { $subsections passwd-md5 }
30 "Parsing a shadowed password entry:"
31 { $subsections parse-shadow-password }
32 "Authenticating against a shadowed password:"
33 { $subsections authenticate-password } ;
34
35 ABOUT: "crypto.passwd-md5"