krb5_error_code krb5_c_make_random_key ( krb5_context context, krb5_enctype enctype, krb5_keyblock *random_key );
The context structure.
The encryption type to use in generating the key.
The random key.
This routine generates a random key for a given encryption type.
This routine returns the following KRB5 status codes:
KRB5_BAD_ENCTYPE
Bad encryption type.
ENOMEM