# MIT Kerberos Documentation

Contents | previous | next | index | Search | feedback

# krb5_k_make_checksum - Compute a checksum (operates on opaque key).

krb5_error_code krb5_k_make_checksum(krb5_context context, krb5_cksumtype cksumtype, krb5_key key, krb5_keyusage usage, const krb5_data *input, krb5_checksum *cksum)

param:

  [in] context - Library context

  [in] cksumtype - Checksum type (0 for mandatory type)

  [in] key - Encryption key for a keyed checksum

  [in] usage - Key usage (see KRB5_KEYUSAGE macros)

  [in] input - Input data

  [out] cksum - Generated checksum

retval:

  - 0 Success; otherwise - Kerberos error codes

This function computes a checksum of type cksumtype over input , using key if the checksum type is a keyed checksum. If cksumtype is 0 and key is non-null, the checksum type will be the mandatory-to-implement checksum type for the key’s encryption type. The actual checksum key will be derived from key and usage if key derivation is specified for the checksum type. The newly created cksum must be released by calling krb5_free_checksum_contents() when it is no longer needed.

See also

krb5_c_verify_checksum()

Note

This function is similar to krb5_c_make_checksum(), but operates on opaque key .