1 .\" Copyright (c) 2004 - 2006 Kungliga Tekniska Högskolan
2 .\" (Royal Institute of Technology, Stockholm, Sweden).
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
16 .\" 3. Neither the name of the Institute nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 .Dt KRB5_STRING_TO_KEY 3
38 .Nm krb5_string_to_key ,
39 .Nm krb5_string_to_key_data ,
40 .Nm krb5_string_to_key_data_salt ,
41 .Nm krb5_string_to_key_data_salt_opaque ,
42 .Nm krb5_string_to_key_salt ,
43 .Nm krb5_string_to_key_salt_opaque ,
44 .Nm krb5_get_pw_salt ,
46 .Nd turns a string to a Kerberos key
48 Kerberos 5 Library (libkrb5, -lkrb5)
52 .Fo krb5_string_to_key
53 .Fa "krb5_context context"
54 .Fa "krb5_enctype enctype"
55 .Fa "const char *password"
56 .Fa "krb5_principal principal"
57 .Fa "krb5_keyblock *key"
60 .Fo krb5_string_to_key_data
61 .Fa "krb5_context context"
62 .Fa "krb5_enctype enctype"
63 .Fa "krb5_data password"
64 .Fa "krb5_principal principal"
65 .Fa "krb5_keyblock *key"
68 .Fo krb5_string_to_key_data_salt
69 .Fa "krb5_context context"
70 .Fa "krb5_enctype enctype"
71 .Fa "krb5_data password"
73 .Fa "krb5_keyblock *key"
76 .Fo krb5_string_to_key_data_salt_opaque
77 .Fa "krb5_context context"
78 .Fa "krb5_enctype enctype"
79 .Fa "krb5_data password"
81 .Fa "krb5_data opaque"
82 .Fa "krb5_keyblock *key"
85 .Fo krb5_string_to_key_salt
86 .Fa "krb5_context context"
87 .Fa "krb5_enctype enctype"
88 .Fa "const char *password"
90 .Fa "krb5_keyblock *key"
93 .Fo krb5_string_to_key_salt_opaque
94 .Fa "krb5_context context"
95 .Fa "krb5_enctype enctype"
96 .Fa "const char *password"
98 .Fa "krb5_data opaque"
99 .Fa "krb5_keyblock *key"
103 .Fa "krb5_context context"
104 .Fa "krb5_const_principal principal"
105 .Fa "krb5_salt *salt"
109 .Fa "krb5_context context"
113 The string to key functions convert a string to a kerberos key.
115 .Fn krb5_string_to_key_data_salt_opaque
116 is the function that does all the work, the rest of the functions are
118 .Fn krb5_string_to_key_data_salt_opaque
119 that calls it with default values.
121 .Fn krb5_string_to_key_data_salt_opaque
124 with the given salt-string
126 and the opaque, encryption type specific parameter
130 according to the string to key function associated with
136 .Fn krb5_free_keyblock_contents .
138 If one of the functions that doesn't take a
142 is used to get the salt value.
145 get the default password salt for a principal, use
147 to free the salt when done.
155 .Xr krb5_keyblock 3 ,