1KRB5_STRING_TO_KEY(3) BSD Library Functions Manual KRB5_STRING_TO_KEY(3)
2
4 krb5_string_to_key, krb5_string_to_key_data,
5 krb5_string_to_key_data_salt, krb5_string_to_key_data_salt_opaque,
6 krb5_string_to_key_salt, krb5_string_to_key_salt_opaque,
7 krb5_get_pw_salt, krb5_free_salt — turns a string to a Kerberos key
8
10 Kerberos 5 Library (libkrb5, -lkrb5)
11
13 #include <krb5.h>
14
15 krb5_error_code
16 krb5_string_to_key(krb5_context context, krb5_enctype enctype,
17 const char *password, krb5_principal principal, krb5_keyblock *key);
18
19 krb5_error_code
20 krb5_string_to_key_data(krb5_context context, krb5_enctype enctype,
21 krb5_data password, krb5_principal principal, krb5_keyblock *key);
22
23 krb5_error_code
24 krb5_string_to_key_data_salt(krb5_context context, krb5_enctype enctype,
25 krb5_data password, krb5_salt salt, krb5_keyblock *key);
26
27 krb5_error_code
28 krb5_string_to_key_data_salt_opaque(krb5_context context,
29 krb5_enctype enctype, krb5_data password, krb5_salt salt,
30 krb5_data opaque, krb5_keyblock *key);
31
32 krb5_error_code
33 krb5_string_to_key_salt(krb5_context context, krb5_enctype enctype,
34 const char *password, krb5_salt salt, krb5_keyblock *key);
35
36 krb5_error_code
37 krb5_string_to_key_salt_opaque(krb5_context context,
38 krb5_enctype enctype, const char *password, krb5_salt salt,
39 krb5_data opaque, krb5_keyblock *key);
40
41 krb5_error_code
42 krb5_get_pw_salt(krb5_context context, krb5_const_principal principal,
43 krb5_salt *salt);
44
45 krb5_error_code
46 krb5_free_salt(krb5_context context, krb5_salt salt);
47
49 The string to key functions convert a string to a kerberos key.
50
51 krb5_string_to_key_data_salt_opaque() is the function that does all the
52 work, the rest of the functions are just wrappers around
53 krb5_string_to_key_data_salt_opaque() that calls it with default values.
54
55 krb5_string_to_key_data_salt_opaque() transforms the password with the
56 given salt-string salt and the opaque, encryption type specific parameter
57 opaque to a encryption key key according to the string to key function
58 associated with enctype.
59
60 The key should be freed with krb5_free_keyblock_contents().
61
62 If one of the functions that doesn't take a krb5_salt as it argument
63 krb5_get_pw_salt() is used to get the salt value.
64
65 krb5_get_pw_salt() get the default password salt for a principal, use
66 krb5_free_salt() to free the salt when done.
67
68 krb5_free_salt() frees the content of salt.
69
71 krb5(3), krb5_data(3), krb5_keyblock(3), kerberos(8)
72
73HEIMDAL July 10, 2006 HEIMDAL