---
name: "krb5_crypto_destroy"
section: "3"
platform: "linux"
package: "heimdal-dev"
version: "1.2.dfsg.1-2.1+lenny1"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/krb5_crypto_destroy"
---

# krb5\_crypto\_destroy(3)

encryption support in krb5

## NAME

**krb5\_crypto\_destroy**, **krb5\_crypto\_init** – encryption support in krb5

## LIBRARY

Kerberos 5 Library (libkrb5, -lkrb5)

## SYNOPSIS

**#include \<krb5.h\>**

*krb5\_error\_code*\

**krb5\_crypto\_init**(*krb5\_context context*, *krb5\_keyblock \*key*, *krb5\_enctype enctype*, *krb5\_crypto \*crypto*);

*krb5\_error\_code*\

**krb5\_crypto\_destroy**(*krb5\_context context*, *krb5\_crypto crypto*);

## DESCRIPTION

Heimdal exports parts of the Kerberos crypto interface for applications.

Each kerberos encrytion/checksum function takes a crypto context.

To setup and destroy crypto contextes there are two functions **krb5\_crypto\_init**() and **krb5\_crypto\_destroy**(). The encryption type to use is taken from the key, but can be overridden with the *enctype*, *parameter*. This can be useful for encryptions types which is compatiable (DES for example).

## SEE ALSO

[krb5\_create\_checksum(3)](/krb5_create_checksum/3.md), [krb5\_encrypt(3)](/krb5_encrypt/3.md)
