krb5_string_to_key(3) krb5_string_to_key_data_salt

Other Alias

krb5_string_to_key_data

LIBRARY

Kerberos 5 Library (libkrb5, -lkrb5)

SYNOPSIS

In krb5.h Ft krb5_error_code Fo krb5_string_to_key Fa krb5_context context Fa krb5_enctype enctype Fa const char *password Fa krb5_principal principal Fa krb5_keyblock *key Fc Ft krb5_error_code Fo krb5_string_to_key_data Fa krb5_context context Fa krb5_enctype enctype Fa krb5_data password Fa krb5_principal principal Fa krb5_keyblock *key Fc Ft krb5_error_code Fo krb5_string_to_key_data_salt Fa krb5_context context Fa krb5_enctype enctype Fa krb5_data password Fa krb5_salt salt Fa krb5_keyblock *key Fc Ft krb5_error_code Fo krb5_string_to_key_data_salt_opaque Fa krb5_context context Fa krb5_enctype enctype Fa krb5_data password Fa krb5_salt salt Fa krb5_data opaque Fa krb5_keyblock *key Fc Ft krb5_error_code Fo krb5_string_to_key_salt Fa krb5_context context Fa krb5_enctype enctype Fa const char *password Fa krb5_salt salt Fa krb5_keyblock *key Fc Ft krb5_error_code Fo krb5_string_to_key_salt_opaque Fa krb5_context context Fa krb5_enctype enctype Fa const char *password Fa krb5_salt salt Fa krb5_data opaque Fa krb5_keyblock *key Fc Ft krb5_error_code Fo krb5_get_pw_salt Fa krb5_context context Fa krb5_const_principal principal Fa krb5_salt *salt Fc Ft krb5_error_code Fo krb5_free_salt Fa krb5_context context Fa krb5_salt salt Fc

DESCRIPTION

The string to key functions convert a string to a kerberos key.

Fn krb5_string_to_key_data_salt_opaque is the function that does all the work, the rest of the functions are just wrappers around Fn krb5_string_to_key_data_salt_opaque that calls it with default values.

Fn krb5_string_to_key_data_salt_opaque transforms the Fa password with the given salt-string Fa salt and the opaque, encryption type specific parameter Fa opaque to a encryption key Fa key according to the string to key function associated with Fa enctype .

The Fa key should be freed with Fn krb5_free_keyblock_contents .

If one of the functions that doesn't take a krb5_salt as it argument Fn krb5_get_pw_salt is used to get the salt value.

Fn krb5_get_pw_salt get the default password salt for a principal, use Fn krb5_free_salt to free the salt when done.

Fn krb5_free_salt frees the content of Fa salt .