Initial import from FreeBSD RELENG_4:
[dragonfly.git] / crypto / heimdal / lib / krb5 / krb5_crypto_init.3
1 .\" Copyright (c) 1999 Kungliga Tekniska Högskolan
2 .\" $Id: krb5_crypto_init.3,v 1.4 2002/08/28 15:30:50 joda Exp $
3 .Dd April  7, 1999
4 .Dt NAME 3
5 .Os HEIMDAL
6 .Sh NAME
7 .Nm krb5_crypto_init ,
8 .Nm krb5_crypto_destroy
9 .Nd initialize encryption context
10 .Sh LIBRARY
11 Kerberos 5 Library (libkrb5, -lkrb5)
12 .Sh SYNOPSIS
13 .Fd #include <krb5.h>
14 .Ft krb5_error_code
15 .Fn krb5_crypto_init "krb5_context context" "krb5_keyblock *key" "krb5_enctype enctype" "krb5_crypto *crypto"
16 .Ft krb5_error_code
17 .Fn krb5_crypto_destroy "krb5_context context" "krb5_crypto crypto"
18 .Sh DESCRIPTION
19 These functions are used to initialize an encryption context that can
20 be used to encrypt or checksum data.
21 .Pp
22 The
23 .Fn krb5_crypt_init
24 initializes the encrytion context
25 .Fa crypto .
26 The
27 .Fa key
28 parameter is the key to use for encryption, and checksums. The
29 encryption type to use is taken from the key, but can be overridden
30 with the
31 .Fa enctype parameter .
32 .Pp
33 .Fn krb5_crypto_destroy
34 frees a previously allocated encrypion context.
35 .\" .Sh EXAMPLE
36 .\" .Sh BUGS
37 .Sh SEE ALSO
38 .Xr krb5_create_checksum 3 ,
39 .Xr krb5_encrypt 3