[][src]Function krb5_sys::krb5_c_decrypt

pub unsafe extern "C" fn krb5_c_decrypt(
    context: krb5_context,
    key: *const krb5_keyblock,
    usage: krb5_keyusage,
    cipher_state: *const krb5_data,
    input: *const krb5_enc_data,
    output: *mut krb5_data
) -> krb5_error_code

Decrypt data using a key (operates on keyblock)

context: Library context key: Encryption key usage: Key usage (see KRB5_KEYUSAGE types) cipher_state: Cipher state; specify NULL if not needed. input: Encrypted data output: Decrypted data

This function decryptes the data block input and stores the output into output. The actual decryption key will be derived from key and usage if key derivation is specified for the encryption type. If non-null, cipher_state specifies the beginning state for the decryption operation, and is updated with the state to be passed as input to the next operation.

Note: The caller must initialize output and allocate at least enough space for the result. The usual practice is to allocate an output buffer as long as the ciphertext, and let krb5_c_decrypt() trim output.length. For some enctypes, the resulting output.length may include padding bytes.

returns 0 on success, kerberos error codes otherwise.