1 .\" $NetBSD: krb5_string_to_key.3,v 1.3 2014/04/24 13:45:34 pettai Exp $
3 .\" Copyright (c) 2004 - 2006 Kungliga Tekniska Högskolan
4 .\" (Royal Institute of Technology, Stockholm, Sweden).
5 .\" All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" 3. Neither the name of the Institute nor the names of its contributors
19 .\" may be used to endorse or promote products derived from this software
20 .\" without specific prior written permission.
22 .\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
23 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
26 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 .Dt KRB5_STRING_TO_KEY 3
40 .Nm krb5_string_to_key ,
41 .Nm krb5_string_to_key_data ,
42 .Nm krb5_string_to_key_data_salt ,
43 .Nm krb5_string_to_key_data_salt_opaque ,
44 .Nm krb5_string_to_key_salt ,
45 .Nm krb5_string_to_key_salt_opaque ,
46 .Nm krb5_get_pw_salt ,
48 .Nd turns a string to a Kerberos key
50 Kerberos 5 Library (libkrb5, -lkrb5)
54 .Fo krb5_string_to_key
55 .Fa "krb5_context context"
56 .Fa "krb5_enctype enctype"
57 .Fa "const char *password"
58 .Fa "krb5_principal principal"
59 .Fa "krb5_keyblock *key"
62 .Fo krb5_string_to_key_data
63 .Fa "krb5_context context"
64 .Fa "krb5_enctype enctype"
65 .Fa "krb5_data password"
66 .Fa "krb5_principal principal"
67 .Fa "krb5_keyblock *key"
70 .Fo krb5_string_to_key_data_salt
71 .Fa "krb5_context context"
72 .Fa "krb5_enctype enctype"
73 .Fa "krb5_data password"
75 .Fa "krb5_keyblock *key"
78 .Fo krb5_string_to_key_data_salt_opaque
79 .Fa "krb5_context context"
80 .Fa "krb5_enctype enctype"
81 .Fa "krb5_data password"
83 .Fa "krb5_data opaque"
84 .Fa "krb5_keyblock *key"
87 .Fo krb5_string_to_key_salt
88 .Fa "krb5_context context"
89 .Fa "krb5_enctype enctype"
90 .Fa "const char *password"
92 .Fa "krb5_keyblock *key"
95 .Fo krb5_string_to_key_salt_opaque
96 .Fa "krb5_context context"
97 .Fa "krb5_enctype enctype"
98 .Fa "const char *password"
100 .Fa "krb5_data opaque"
101 .Fa "krb5_keyblock *key"
105 .Fa "krb5_context context"
106 .Fa "krb5_const_principal principal"
107 .Fa "krb5_salt *salt"
111 .Fa "krb5_context context"
115 The string to key functions convert a string to a kerberos key.
117 .Fn krb5_string_to_key_data_salt_opaque
118 is the function that does all the work, the rest of the functions are
120 .Fn krb5_string_to_key_data_salt_opaque
121 that calls it with default values.
123 .Fn krb5_string_to_key_data_salt_opaque
126 with the given salt-string
128 and the opaque, encryption type specific parameter
132 according to the string to key function associated with
138 .Fn krb5_free_keyblock_contents .
140 If one of the functions that doesn't take a
144 is used to get the salt value.
147 get the default password salt for a principal, use
149 to free the salt when done.
157 .Xr krb5_keyblock 3 ,