Section: C Library Functions (3)Local indexUp BSD mandoc
HEIMDAL
NAME
krb5_string_to_keykrb5_string_to_key_datakrb5_string_to_key_data_saltkrb5_string_to_key_data_salt_opaquekrb5_string_to_key_saltkrb5_string_to_key_salt_opaquekrb5_get_pw_saltkrb5_free_salt
- turns a string to a Kerberos key
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 wrapers 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.