xref: /freebsd/crypto/heimdal/lib/krb5/krb5_encrypt.3 (revision 17d6c636720d00f77e5d098daf4c278f89d84f7b)
1.\" Copyright (c) 1999 Kungliga Tekniska H�gskolan
2.\" $Id: krb5_encrypt.3,v 1.2 2001/01/26 22:43:22 assar Exp $
3.Dd April  7, 1999
4.Dt KRB5_ENCRYPT 3
5.Os HEIMDAL
6.Sh NAME
7.Nm krb5_decrypt ,
8.Nm krb5_decrypt_EncryptedData ,
9.Nm krb5_encrypt ,
10.Nm krb5_encrypt_EncryptedData
11.Nd encrypt and decrypt data
12.Sh SYNOPSIS
13.Fd #include <krb5.h>
14.Ft krb5_error_code
15.Fn krb5_encrypt "krb5_context context" "krb5_crypto crypto" "unsigned usage" "void *data" "size_t len" "krb5_data *result"
16.Ft krb5_error_code
17.Fn krb5_encrypt_EncryptedData "krb5_context context" "krb5_crypto crypto" "unsigned usage" "void *data" "size_t len" "int kvno" "EncryptedData *result"
18.Ft krb5_error_code
19.Fn krb5_decrypt "krb5_context context" "krb5_crypto crypto" "unsigned usage" "void *data" "size_t len" "krb5_data *result"
20.Ft krb5_error_code
21.Fn krb5_decrypt_EncryptedData "krb5_context context" "krb5_crypto crypto" "unsigned usage" "EncryptedData *e" "krb5_data *result"
22.Sh DESCRIPTION
23These functions are used to encrypt and decrypt data.
24.Pp
25.Fn krb5_encrypt
26puts the encrypted version of
27.Fa data
28(of size
29.Fa len )
30in
31.Fa result .
32If the encryption type supports using derived keys,
33.Fa usage
34should be the appropriate key-usage.
35.Fn krb5_encrypt_EncryptedData
36does the same as
37.Fn krb5_encrypt ,
38but it puts the encrypted data in a
39.Fa EncryptedData
40structure instead. If
41.Fa kvno
42is not zero, it will be put in the
43.Fa kvno field in the
44.Fa EncryptedData .
45.Pp
46.Fn krb5_decrypt ,
47and
48.Fn krb5_decrypt_EncryptedData
49works similarly.
50.\" .Sh EXAMPLE
51.\" .Sh BUGS
52.Sh SEE ALSO
53.Xr krb5_crypto_init 3 ,
54.Xr krb5_create_checksum 3
55