# MIT Kerberos Documentation

Contents | previous | next | index | Search | feedback

# krb5_c_random_to_key - Generate an enctype-specific key from random data.

krb5_error_code krb5_c_random_to_key(krb5_context context, krb5_enctype enctype, krb5_data *random_data, krb5_keyblock *k5_random_key)

param:

  [in] context - Library context

  [in] enctype - Encryption type

  [in] random_data - Random input data

  [out] k5_random_key - Resulting key

retval:

  - 0 Success; otherwise - Kerberos error codes

This function takes random input data random_data and produces a valid key k5_random_key for a given enctype .

See also

krb5_c_keylengths()

Note

It is assumed that k5_random_key has already been initialized and k5_random_key->contents has been allocated with the correct length.