<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>HeimdalKerberos5library: Heimdal Kerberos 5 cryptography functions</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<p>
<a href="http://www.h5l.org/"><img src="http://www.h5l.org/keyhole-heimdal.png" alt="keyhole logo"/></a>
</p>
<!-- end of header marker -->
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>Heimdal Kerberos 5 cryptography functions</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#gd5f2b15d5fde369cf923e8fae4b00bec">krb5_enctype_valid</a> (krb5_context context, krb5_enctype etype)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g49d7081ff071eacd28e3ffa90400580c">krb5_cksumtype_to_enctype</a> (krb5_context context, krb5_cksumtype ctype, krb5_enctype *etype)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g674423844043d6beebb959bb8b7ab082">krb5_encrypt_iov_ivec</a> (krb5_context context, krb5_crypto crypto, unsigned usage, <a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> *data, int num_data, void *ivec)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g64cad191491a5d3309553e7d28d8ad46">krb5_decrypt_iov_ivec</a> (krb5_context context, krb5_crypto crypto, unsigned usage, <a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> *data, unsigned int num_data, void *ivec)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#gb70888d1122aeed1e5381116a5a9612e">krb5_create_checksum_iov</a> (krb5_context context, krb5_crypto crypto, unsigned usage, <a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> *data, unsigned int num_data, krb5_cksumtype *type)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g1789d8188287750394c3b8366a90bd13">krb5_verify_checksum_iov</a> (krb5_context context, krb5_crypto crypto, unsigned usage, <a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> *data, unsigned int num_data, krb5_cksumtype *type)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#gd7003a8a81cef633cc0a2cc07c93dd32">krb5_crypto_init</a> (krb5_context context, const krb5_keyblock *key, krb5_enctype etype, krb5_crypto *crypto)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g57eaed735baab9eb3c3740be8e4d2137">krb5_crypto_destroy</a> (krb5_context context, krb5_crypto crypto)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#ga4271d4adba2dff699dfdfe07b075b95">krb5_crypto_getblocksize</a> (krb5_context context, krb5_crypto crypto, size_t *blocksize)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g6bc15d1940ecdd4558f18eeb3dda233c">krb5_crypto_getenctype</a> (krb5_context context, krb5_crypto crypto, krb5_enctype *enctype)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#gfbed35e76f7d971b90cfe0806f43d279">krb5_crypto_getpadsize</a> (krb5_context context, krb5_crypto crypto, size_t *padsize)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g38d88d8bf7be6913cfc7cf155a1ade8e">krb5_crypto_getconfoundersize</a> (krb5_context context, krb5_crypto crypto, size_t *confoundersize)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g77acfc640aa003095ea5890de2ea1cb7">krb5_enctype_disable</a> (krb5_context context, krb5_enctype enctype)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g8dfebc785c059e38c22c6ca34ed5f68a">krb5_enctype_enable</a> (krb5_context context, krb5_enctype enctype)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g2790b9799fbe21ac4875c401eafb7444">krb5_allow_weak_crypto</a> (krb5_context context, krb5_boolean enable)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#ga5f3001696f59f7d47539efe82b1c4cd">krb5_random_to_key</a> (krb5_context context, krb5_enctype type, const void *data, size_t size, krb5_keyblock *key)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g6deab998fe1c056fff541cdf0c119c44">krb5_crypto_fx_cf2</a> (krb5_context context, const krb5_crypto crypto1, const krb5_crypto crypto2, krb5_data *pepper1, krb5_data *pepper2, krb5_enctype enctype, krb5_keyblock *res)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g147a581626c11fafee04bfda036781ea">krb5_generate_subkey_extended</a> (krb5_context context, const krb5_keyblock *key, krb5_enctype etype, krb5_keyblock **subkey)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION void <br>
KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g33e1cb14ccab45ce46d51064caf07c10">krb5_keyblock_zero</a> (krb5_keyblock *keyblock)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION void <br>
KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g66d5d8067358373fdab46987503f2398">krb5_free_keyblock_contents</a> (krb5_context context, krb5_keyblock *keyblock)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION void <br>
KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g2e434abf56e7d7852358e11cdab0bb33">krb5_free_keyblock</a> (krb5_context context, krb5_keyblock *keyblock)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g61fbae0666b6889f539c98a45c1564ae">krb5_copy_keyblock_contents</a> (krb5_context context, const krb5_keyblock *inblock, krb5_keyblock *to)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#gb68e1eb316fba45acafd300ac6d93101">krb5_copy_keyblock</a> (krb5_context context, const krb5_keyblock *inblock, krb5_keyblock **to)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION krb5_enctype <br>
KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#ga2caa584d5a6f0bbba3e1bae7255be5c">krb5_keyblock_get_enctype</a> (const krb5_keyblock *block)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br>
krb5_error_code KRB5_LIB_CALL </td><td class="memItemRight" valign="bottom"><a class="el" href="group__krb5__crypto.html#g690c42630f2f6b9f7ce96cc75441803d">krb5_keyblock_init</a> (krb5_context context, krb5_enctype type, const void *data, size_t size, krb5_keyblock *key)</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="g2790b9799fbe21ac4875c401eafb7444"></a><!-- doxytag: member="crypto.c::krb5_allow_weak_crypto" ref="g2790b9799fbe21ac4875c401eafb7444" args="(krb5_context context, krb5_boolean enable)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_allow_weak_crypto </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_boolean </td>
<td class="paramname"> <em>enable</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Enable or disable all weak encryption types<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>enable</em> </td><td>true to enable, false to disable</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl>
</div>
</div><p>
<a class="anchor" name="g49d7081ff071eacd28e3ffa90400580c"></a><!-- doxytag: member="crypto.c::krb5_cksumtype_to_enctype" ref="g49d7081ff071eacd28e3ffa90400580c" args="(krb5_context context, krb5_cksumtype ctype, krb5_enctype *etype)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cksumtype_to_enctype </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_cksumtype </td>
<td class="paramname"> <em>ctype</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_enctype * </td>
<td class="paramname"> <em>etype</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Return the coresponding encryption type for a checksum type.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>ctype</em> </td><td>The checksum type to get the result enctype for </td></tr>
<tr><td valign="top"></td><td valign="top"><em>etype</em> </td><td>The returned encryption, when the matching etype is not found, etype is set to ETYPE_NULL.</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code for an failure or 0 on success. </dd></dl>
</div>
</div><p>
<a class="anchor" name="gb68e1eb316fba45acafd300ac6d93101"></a><!-- doxytag: member="keyblock.c::krb5_copy_keyblock" ref="gb68e1eb316fba45acafd300ac6d93101" args="(krb5_context context, const krb5_keyblock *inblock, krb5_keyblock **to)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_keyblock </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const krb5_keyblock * </td>
<td class="paramname"> <em>inblock</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_keyblock ** </td>
<td class="paramname"> <em>to</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Copy a keyblock, free the output keyblock with <a class="el" href="group__krb5__crypto.html#g2e434abf56e7d7852358e11cdab0bb33">krb5_free_keyblock()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>a Kerberos 5 context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>inblock</em> </td><td>the key to copy </td></tr>
<tr><td valign="top"></td><td valign="top"><em>to</em> </td><td>the output key.</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success or a Kerberos 5 error code </dd></dl>
</div>
</div><p>
<a class="anchor" name="g61fbae0666b6889f539c98a45c1564ae"></a><!-- doxytag: member="keyblock.c::krb5_copy_keyblock_contents" ref="g61fbae0666b6889f539c98a45c1564ae" args="(krb5_context context, const krb5_keyblock *inblock, krb5_keyblock *to)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_keyblock_contents </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const krb5_keyblock * </td>
<td class="paramname"> <em>inblock</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_keyblock * </td>
<td class="paramname"> <em>to</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Copy a keyblock, free the output keyblock with <a class="el" href="group__krb5__crypto.html#g66d5d8067358373fdab46987503f2398">krb5_free_keyblock_contents()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>a Kerberos 5 context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>inblock</em> </td><td>the key to copy </td></tr>
<tr><td valign="top"></td><td valign="top"><em>to</em> </td><td>the output key.</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success or a Kerberos 5 error code </dd></dl>
</div>
</div><p>
<a class="anchor" name="gb70888d1122aeed1e5381116a5a9612e"></a><!-- doxytag: member="crypto.c::krb5_create_checksum_iov" ref="gb70888d1122aeed1e5381116a5a9612e" args="(krb5_context context, krb5_crypto crypto, unsigned usage, krb5_crypto_iov *data, unsigned int num_data, krb5_cksumtype *type)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_create_checksum_iov </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_crypto </td>
<td class="paramname"> <em>crypto</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned </td>
<td class="paramname"> <em>usage</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> * </td>
<td class="paramname"> <em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"> <em>num_data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_cksumtype * </td>
<td class="paramname"> <em>type</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Create a Kerberos message checksum.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>Kerberos crypto context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>usage</em> </td><td>Key usage for this buffer </td></tr>
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>array of buffers to process </td></tr>
<tr><td valign="top"></td><td valign="top"><em>num_data</em> </td><td>length of array </td></tr>
<tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>output data</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl>
</div>
</div><p>
<a class="anchor" name="g57eaed735baab9eb3c3740be8e4d2137"></a><!-- doxytag: member="crypto.c::krb5_crypto_destroy" ref="g57eaed735baab9eb3c3740be8e4d2137" args="(krb5_context context, krb5_crypto crypto)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_destroy </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_crypto </td>
<td class="paramname"> <em>crypto</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Free a crypto context created by <a class="el" href="group__krb5__crypto.html#gd7003a8a81cef633cc0a2cc07c93dd32">krb5_crypto_init()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>crypto context to free</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl>
</div>
</div><p>
<a class="anchor" name="g6deab998fe1c056fff541cdf0c119c44"></a><!-- doxytag: member="crypto.c::krb5_crypto_fx_cf2" ref="g6deab998fe1c056fff541cdf0c119c44" args="(krb5_context context, const krb5_crypto crypto1, const krb5_crypto crypto2, krb5_data *pepper1, krb5_data *pepper2, krb5_enctype enctype, krb5_keyblock *res)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_fx_cf2 </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const krb5_crypto </td>
<td class="paramname"> <em>crypto1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const krb5_crypto </td>
<td class="paramname"> <em>crypto2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_data * </td>
<td class="paramname"> <em>pepper1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_data * </td>
<td class="paramname"> <em>pepper2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_enctype </td>
<td class="paramname"> <em>enctype</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_keyblock * </td>
<td class="paramname"> <em>res</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The FX-CF2 key derivation function, used in FAST and preauth framework.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>crypto1</em> </td><td>first key to combine </td></tr>
<tr><td valign="top"></td><td valign="top"><em>crypto2</em> </td><td>second key to combine </td></tr>
<tr><td valign="top"></td><td valign="top"><em>pepper1</em> </td><td>factor to combine with first key to garante uniqueness </td></tr>
<tr><td valign="top"></td><td valign="top"><em>pepper2</em> </td><td>factor to combine with second key to garante uniqueness </td></tr>
<tr><td valign="top"></td><td valign="top"><em>enctype</em> </td><td>the encryption type of the resulting key </td></tr>
<tr><td valign="top"></td><td valign="top"><em>res</em> </td><td>allocated key, free with <a class="el" href="group__krb5__crypto.html#g66d5d8067358373fdab46987503f2398">krb5_free_keyblock_contents()</a></td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl>
</div>
</div><p>
<a class="anchor" name="ga4271d4adba2dff699dfdfe07b075b95"></a><!-- doxytag: member="crypto.c::krb5_crypto_getblocksize" ref="ga4271d4adba2dff699dfdfe07b075b95" args="(krb5_context context, krb5_crypto crypto, size_t *blocksize)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getblocksize </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_crypto </td>
<td class="paramname"> <em>crypto</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t * </td>
<td class="paramname"> <em>blocksize</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Return the blocksize used algorithm referenced by the crypto context<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>crypto context to query </td></tr>
<tr><td valign="top"></td><td valign="top"><em>blocksize</em> </td><td>the resulting blocksize</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl>
</div>
</div><p>
<a class="anchor" name="g38d88d8bf7be6913cfc7cf155a1ade8e"></a><!-- doxytag: member="crypto.c::krb5_crypto_getconfoundersize" ref="g38d88d8bf7be6913cfc7cf155a1ade8e" args="(krb5_context context, krb5_crypto crypto, size_t *confoundersize)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getconfoundersize </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_crypto </td>
<td class="paramname"> <em>crypto</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t * </td>
<td class="paramname"> <em>confoundersize</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Return the confounder size used by the crypto context<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>crypto context to query </td></tr>
<tr><td valign="top"></td><td valign="top"><em>confoundersize</em> </td><td>the returned confounder size</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl>
</div>
</div><p>
<a class="anchor" name="g6bc15d1940ecdd4558f18eeb3dda233c"></a><!-- doxytag: member="crypto.c::krb5_crypto_getenctype" ref="g6bc15d1940ecdd4558f18eeb3dda233c" args="(krb5_context context, krb5_crypto crypto, krb5_enctype *enctype)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getenctype </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_crypto </td>
<td class="paramname"> <em>crypto</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_enctype * </td>
<td class="paramname"> <em>enctype</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Return the encryption type used by the crypto context<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>crypto context to query </td></tr>
<tr><td valign="top"></td><td valign="top"><em>enctype</em> </td><td>the resulting encryption type</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl>
</div>
</div><p>
<a class="anchor" name="gfbed35e76f7d971b90cfe0806f43d279"></a><!-- doxytag: member="crypto.c::krb5_crypto_getpadsize" ref="gfbed35e76f7d971b90cfe0806f43d279" args="(krb5_context context, krb5_crypto crypto, size_t *padsize)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getpadsize </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_crypto </td>
<td class="paramname"> <em>crypto</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t * </td>
<td class="paramname"> <em>padsize</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Return the padding size used by the crypto context<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>crypto context to query </td></tr>
<tr><td valign="top"></td><td valign="top"><em>padsize</em> </td><td>the return padding size</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl>
</div>
</div><p>
<a class="anchor" name="gd7003a8a81cef633cc0a2cc07c93dd32"></a><!-- doxytag: member="crypto.c::krb5_crypto_init" ref="gd7003a8a81cef633cc0a2cc07c93dd32" args="(krb5_context context, const krb5_keyblock *key, krb5_enctype etype, krb5_crypto *crypto)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_init </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const krb5_keyblock * </td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_enctype </td>
<td class="paramname"> <em>etype</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_crypto * </td>
<td class="paramname"> <em>crypto</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Create a crypto context used for all encryption and signature operation. 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).<p>
To free the crypto context, use <a class="el" href="group__krb5__crypto.html#g57eaed735baab9eb3c3740be8e4d2137">krb5_crypto_destroy()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em> </td><td>the key block information with all key data </td></tr>
<tr><td valign="top"></td><td valign="top"><em>etype</em> </td><td>the encryption type </td></tr>
<tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>the resulting crypto context</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl>
</div>
</div><p>
<a class="anchor" name="g64cad191491a5d3309553e7d28d8ad46"></a><!-- doxytag: member="crypto.c::krb5_decrypt_iov_ivec" ref="g64cad191491a5d3309553e7d28d8ad46" args="(krb5_context context, krb5_crypto crypto, unsigned usage, krb5_crypto_iov *data, unsigned int num_data, void *ivec)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_decrypt_iov_ivec </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_crypto </td>
<td class="paramname"> <em>crypto</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned </td>
<td class="paramname"> <em>usage</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> * </td>
<td class="paramname"> <em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"> <em>num_data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>ivec</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Inline decrypt a Kerberos message.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>Kerberos crypto context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>usage</em> </td><td>Key usage for this buffer </td></tr>
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>array of buffers to process </td></tr>
<tr><td valign="top"></td><td valign="top"><em>num_data</em> </td><td>length of array </td></tr>
<tr><td valign="top"></td><td valign="top"><em>ivec</em> </td><td>initial cbc/cts vector</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0.</dd></dl>
1. KRB5_CRYPTO_TYPE_HEADER 2. one KRB5_CRYPTO_TYPE_DATA and array [0,...] of KRB5_CRYPTO_TYPE_SIGN_ONLY in any order, however the receiver have to aware of the order. KRB5_CRYPTO_TYPE_SIGN_ONLY is commonly used unencrypoted protocol headers and trailers. The output data will be of same size as the input data or shorter.
</div>
</div><p>
<a class="anchor" name="g674423844043d6beebb959bb8b7ab082"></a><!-- doxytag: member="crypto.c::krb5_encrypt_iov_ivec" ref="g674423844043d6beebb959bb8b7ab082" args="(krb5_context context, krb5_crypto crypto, unsigned usage, krb5_crypto_iov *data, int num_data, void *ivec)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_encrypt_iov_ivec </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_crypto </td>
<td class="paramname"> <em>crypto</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned </td>
<td class="paramname"> <em>usage</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> * </td>
<td class="paramname"> <em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>num_data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>ivec</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Inline encrypt a kerberos message<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>Kerberos crypto context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>usage</em> </td><td>Key usage for this buffer </td></tr>
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>array of buffers to process </td></tr>
<tr><td valign="top"></td><td valign="top"><em>num_data</em> </td><td>length of array </td></tr>
<tr><td valign="top"></td><td valign="top"><em>ivec</em> </td><td>initial cbc/cts vector</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0.</dd></dl>
Kerberos encrypted data look like this:<p>
1. KRB5_CRYPTO_TYPE_HEADER 2. array [1,...] KRB5_CRYPTO_TYPE_DATA and array [0,...] KRB5_CRYPTO_TYPE_SIGN_ONLY in any order, however the receiver have to aware of the order. KRB5_CRYPTO_TYPE_SIGN_ONLY is commonly used headers and trailers. 3. KRB5_CRYPTO_TYPE_PADDING, at least on padsize long if padsize > 1 4. KRB5_CRYPTO_TYPE_TRAILER
</div>
</div><p>
<a class="anchor" name="g77acfc640aa003095ea5890de2ea1cb7"></a><!-- doxytag: member="crypto.c::krb5_enctype_disable" ref="g77acfc640aa003095ea5890de2ea1cb7" args="(krb5_context context, krb5_enctype enctype)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_enctype_disable </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_enctype </td>
<td class="paramname"> <em>enctype</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Disable encryption type<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>enctype</em> </td><td>encryption type to disable</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl>
</div>
</div><p>
<a class="anchor" name="g8dfebc785c059e38c22c6ca34ed5f68a"></a><!-- doxytag: member="crypto.c::krb5_enctype_enable" ref="g8dfebc785c059e38c22c6ca34ed5f68a" args="(krb5_context context, krb5_enctype enctype)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_enctype_enable </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_enctype </td>
<td class="paramname"> <em>enctype</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Enable encryption type<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>enctype</em> </td><td>encryption type to enable</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl>
</div>
</div><p>
<a class="anchor" name="gd5f2b15d5fde369cf923e8fae4b00bec"></a><!-- doxytag: member="crypto.c::krb5_enctype_valid" ref="gd5f2b15d5fde369cf923e8fae4b00bec" args="(krb5_context context, krb5_enctype etype)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_enctype_valid </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_enctype </td>
<td class="paramname"> <em>etype</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Check if a enctype is valid, return 0 if it is.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>etype</em> </td><td>enctype to check if its valid or not</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code for an failure or 0 on success (enctype valid). </dd></dl>
</div>
</div><p>
<a class="anchor" name="g2e434abf56e7d7852358e11cdab0bb33"></a><!-- doxytag: member="keyblock.c::krb5_free_keyblock" ref="g2e434abf56e7d7852358e11cdab0bb33" args="(krb5_context context, krb5_keyblock *keyblock)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_keyblock </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_keyblock * </td>
<td class="paramname"> <em>keyblock</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Free a keyblock, also zero out the content of the keyblock, uses <a class="el" href="group__krb5__crypto.html#g66d5d8067358373fdab46987503f2398">krb5_free_keyblock_contents()</a> to free the content.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>a Kerberos 5 context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>keyblock</em> </td><td>keyblock to free, NULL is valid argument </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="g66d5d8067358373fdab46987503f2398"></a><!-- doxytag: member="keyblock.c::krb5_free_keyblock_contents" ref="g66d5d8067358373fdab46987503f2398" args="(krb5_context context, krb5_keyblock *keyblock)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_keyblock_contents </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_keyblock * </td>
<td class="paramname"> <em>keyblock</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Free a keyblock's content, also zero out the content of the keyblock.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>a Kerberos 5 context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>keyblock</em> </td><td>keyblock content to free, NULL is valid argument </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="g147a581626c11fafee04bfda036781ea"></a><!-- doxytag: member="generate_subkey.c::krb5_generate_subkey_extended" ref="g147a581626c11fafee04bfda036781ea" args="(krb5_context context, const krb5_keyblock *key, krb5_enctype etype, krb5_keyblock **subkey)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_generate_subkey_extended </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const krb5_keyblock * </td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_enctype </td>
<td class="paramname"> <em>etype</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_keyblock ** </td>
<td class="paramname"> <em>subkey</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Generate subkey, from keyblock<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>kerberos context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em> </td><td>session key </td></tr>
<tr><td valign="top"></td><td valign="top"><em>etype</em> </td><td>encryption type of subkey, if ETYPE_NULL, use key's enctype </td></tr>
<tr><td valign="top"></td><td valign="top"><em>subkey</em> </td><td>returned new, free with <a class="el" href="group__krb5__crypto.html#g2e434abf56e7d7852358e11cdab0bb33">krb5_free_keyblock()</a>.</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success or a Kerberos 5 error code </dd></dl>
</div>
</div><p>
<a class="anchor" name="ga2caa584d5a6f0bbba3e1bae7255be5c"></a><!-- doxytag: member="keyblock.c::krb5_keyblock_get_enctype" ref="ga2caa584d5a6f0bbba3e1bae7255be5c" args="(const krb5_keyblock *block)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_enctype KRB5_LIB_CALL krb5_keyblock_get_enctype </td>
<td>(</td>
<td class="paramtype">const krb5_keyblock * </td>
<td class="paramname"> <em>block</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get encryption type of a keyblock.
</div>
</div><p>
<a class="anchor" name="g690c42630f2f6b9f7ce96cc75441803d"></a><!-- doxytag: member="keyblock.c::krb5_keyblock_init" ref="g690c42630f2f6b9f7ce96cc75441803d" args="(krb5_context context, krb5_enctype type, const void *data, size_t size, krb5_keyblock *key)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_keyblock_init </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_enctype </td>
<td class="paramname"> <em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const void * </td>
<td class="paramname"> <em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_keyblock * </td>
<td class="paramname"> <em>key</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Fill in `key' with key data of type `enctype' from `data' of length `size'. Key should be freed using <a class="el" href="group__krb5__crypto.html#g66d5d8067358373fdab46987503f2398">krb5_free_keyblock_contents()</a>.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success or a Kerberos 5 error code </dd></dl>
</div>
</div><p>
<a class="anchor" name="g33e1cb14ccab45ce46d51064caf07c10"></a><!-- doxytag: member="keyblock.c::krb5_keyblock_zero" ref="g33e1cb14ccab45ce46d51064caf07c10" args="(krb5_keyblock *keyblock)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_keyblock_zero </td>
<td>(</td>
<td class="paramtype">krb5_keyblock * </td>
<td class="paramname"> <em>keyblock</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Zero out a keyblock<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>keyblock</em> </td><td>keyblock to zero out </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="ga5f3001696f59f7d47539efe82b1c4cd"></a><!-- doxytag: member="crypto.c::krb5_random_to_key" ref="ga5f3001696f59f7d47539efe82b1c4cd" args="(krb5_context context, krb5_enctype type, const void *data, size_t size, krb5_keyblock *key)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_random_to_key </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_enctype </td>
<td class="paramname"> <em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const void * </td>
<td class="paramname"> <em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_keyblock * </td>
<td class="paramname"> <em>key</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Converts the random bytestring to a protocol key according to Kerberos crypto frame work. It may be assumed that all the bits of the input string are equally random, even though the entropy present in the random source may be limited.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>the enctype resulting key will be of </td></tr>
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>input random data to convert to a key </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>size of input random data, at least krb5_enctype_keysize() long </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em> </td><td>key, output key, free with <a class="el" href="group__krb5__crypto.html#g66d5d8067358373fdab46987503f2398">krb5_free_keyblock_contents()</a></td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl>
</div>
</div><p>
<a class="anchor" name="g1789d8188287750394c3b8366a90bd13"></a><!-- doxytag: member="crypto.c::krb5_verify_checksum_iov" ref="g1789d8188287750394c3b8366a90bd13" args="(krb5_context context, krb5_crypto crypto, unsigned usage, krb5_crypto_iov *data, unsigned int num_data, krb5_cksumtype *type)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_verify_checksum_iov </td>
<td>(</td>
<td class="paramtype">krb5_context </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_crypto </td>
<td class="paramname"> <em>crypto</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned </td>
<td class="paramname"> <em>usage</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> * </td>
<td class="paramname"> <em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"> <em>num_data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">krb5_cksumtype * </td>
<td class="paramname"> <em>type</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Verify a Kerberos message checksum.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>Kerberos crypto context </td></tr>
<tr><td valign="top"></td><td valign="top"><em>usage</em> </td><td>Key usage for this buffer </td></tr>
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>array of buffers to process </td></tr>
<tr><td valign="top"></td><td valign="top"><em>num_data</em> </td><td>length of array </td></tr>
<tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>return checksum type if not NULL</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl>
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>
Generated on Wed Jan 11 14:07:48 2012 for HeimdalKerberos5library by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address>
</body>
</html>