1226031Sstas<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2226031Sstas<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 3226031Sstas<title>HeimdalKerberos5library: Heimdal Kerberos 5 cryptography functions</title> 4226031Sstas<link href="doxygen.css" rel="stylesheet" type="text/css"> 5226031Sstas<link href="tabs.css" rel="stylesheet" type="text/css"> 6226031Sstas</head><body> 7226031Sstas<p> 8226031Sstas<a href="http://www.h5l.org/"><img src="http://www.h5l.org/keyhole-heimdal.png" alt="keyhole logo"/></a> 9226031Sstas</p> 10226031Sstas<!-- end of header marker --> 11226031Sstas<!-- Generated by Doxygen 1.5.6 --> 12226031Sstas<div class="navigation" id="top"> 13226031Sstas <div class="tabs"> 14226031Sstas <ul> 15226031Sstas <li><a href="index.html"><span>Main Page</span></a></li> 16226031Sstas <li><a href="pages.html"><span>Related Pages</span></a></li> 17226031Sstas <li><a href="modules.html"><span>Modules</span></a></li> 18226031Sstas <li><a href="annotated.html"><span>Data Structures</span></a></li> 19226031Sstas </ul> 20226031Sstas </div> 21226031Sstas</div> 22226031Sstas<div class="contents"> 23226031Sstas<h1>Heimdal Kerberos 5 cryptography functions</h1><table border="0" cellpadding="0" cellspacing="0"> 24226031Sstas<tr><td></td></tr> 25226031Sstas<tr><td colspan="2"><br><h2>Functions</h2></td></tr> 26226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 27226031Sstaskrb5_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> 28226031Sstas 29226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 30226031Sstaskrb5_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> 31226031Sstas 32226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 33226031Sstaskrb5_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> 34226031Sstas 35226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 36226031Sstaskrb5_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> 37226031Sstas 38226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 39226031Sstaskrb5_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> 40226031Sstas 41226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 42226031Sstaskrb5_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> 43226031Sstas 44226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 45226031Sstaskrb5_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> 46226031Sstas 47226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 48226031Sstaskrb5_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> 49226031Sstas 50226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 51226031Sstaskrb5_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> 52226031Sstas 53226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 54226031Sstaskrb5_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> 55226031Sstas 56226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 57226031Sstaskrb5_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> 58226031Sstas 59226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 60226031Sstaskrb5_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> 61226031Sstas 62226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 63226031Sstaskrb5_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> 64226031Sstas 65226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 66226031Sstaskrb5_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> 67226031Sstas 68226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 69226031Sstaskrb5_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> 70226031Sstas 71226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 72226031Sstaskrb5_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> 73226031Sstas 74226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 75226031Sstaskrb5_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> 76226031Sstas 77226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 78226031Sstaskrb5_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> 79226031Sstas 80226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION void <br> 81226031SstasKRB5_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> 82226031Sstas 83226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION void <br> 84226031SstasKRB5_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> 85226031Sstas 86226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION void <br> 87226031SstasKRB5_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> 88226031Sstas 89226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 90226031Sstaskrb5_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> 91226031Sstas 92226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 93226031Sstaskrb5_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> 94226031Sstas 95226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION krb5_enctype <br> 96226031SstasKRB5_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> 97226031Sstas 98226031Sstas<tr><td class="memItemLeft" nowrap align="right" valign="top">KRB5_LIB_FUNCTION <br> 99226031Sstaskrb5_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> 100226031Sstas 101226031Sstas</table> 102226031Sstas<hr><a name="_details"></a><h2>Detailed Description</h2> 103226031Sstas<hr><h2>Function Documentation</h2> 104226031Sstas<a class="anchor" name="g2790b9799fbe21ac4875c401eafb7444"></a><!-- doxytag: member="crypto.c::krb5_allow_weak_crypto" ref="g2790b9799fbe21ac4875c401eafb7444" args="(krb5_context context, krb5_boolean enable)" --> 105226031Sstas<div class="memitem"> 106226031Sstas<div class="memproto"> 107226031Sstas <table class="memname"> 108226031Sstas <tr> 109226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_allow_weak_crypto </td> 110226031Sstas <td>(</td> 111226031Sstas <td class="paramtype">krb5_context </td> 112226031Sstas <td class="paramname"> <em>context</em>, </td> 113226031Sstas </tr> 114226031Sstas <tr> 115226031Sstas <td class="paramkey"></td> 116226031Sstas <td></td> 117226031Sstas <td class="paramtype">krb5_boolean </td> 118226031Sstas <td class="paramname"> <em>enable</em></td><td> </td> 119226031Sstas </tr> 120226031Sstas <tr> 121226031Sstas <td></td> 122226031Sstas <td>)</td> 123226031Sstas <td></td><td></td><td></td> 124226031Sstas </tr> 125226031Sstas </table> 126226031Sstas</div> 127226031Sstas<div class="memdoc"> 128226031Sstas 129226031Sstas<p> 130226031SstasEnable or disable all weak encryption types<p> 131226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 132226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 133226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr> 134226031Sstas <tr><td valign="top"></td><td valign="top"><em>enable</em> </td><td>true to enable, false to disable</td></tr> 135226031Sstas </table> 136226031Sstas</dl> 137226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 138226031Sstas 139226031Sstas</div> 140226031Sstas</div><p> 141226031Sstas<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)" --> 142226031Sstas<div class="memitem"> 143226031Sstas<div class="memproto"> 144226031Sstas <table class="memname"> 145226031Sstas <tr> 146226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cksumtype_to_enctype </td> 147226031Sstas <td>(</td> 148226031Sstas <td class="paramtype">krb5_context </td> 149226031Sstas <td class="paramname"> <em>context</em>, </td> 150226031Sstas </tr> 151226031Sstas <tr> 152226031Sstas <td class="paramkey"></td> 153226031Sstas <td></td> 154226031Sstas <td class="paramtype">krb5_cksumtype </td> 155226031Sstas <td class="paramname"> <em>ctype</em>, </td> 156226031Sstas </tr> 157226031Sstas <tr> 158226031Sstas <td class="paramkey"></td> 159226031Sstas <td></td> 160226031Sstas <td class="paramtype">krb5_enctype * </td> 161226031Sstas <td class="paramname"> <em>etype</em></td><td> </td> 162226031Sstas </tr> 163226031Sstas <tr> 164226031Sstas <td></td> 165226031Sstas <td>)</td> 166226031Sstas <td></td><td></td><td></td> 167226031Sstas </tr> 168226031Sstas </table> 169226031Sstas</div> 170226031Sstas<div class="memdoc"> 171226031Sstas 172226031Sstas<p> 173226031SstasReturn the coresponding encryption type for a checksum type.<p> 174226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 175226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 176226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 177226031Sstas <tr><td valign="top"></td><td valign="top"><em>ctype</em> </td><td>The checksum type to get the result enctype for </td></tr> 178226031Sstas <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> 179226031Sstas </table> 180226031Sstas</dl> 181226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code for an failure or 0 on success. </dd></dl> 182226031Sstas 183226031Sstas</div> 184226031Sstas</div><p> 185226031Sstas<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)" --> 186226031Sstas<div class="memitem"> 187226031Sstas<div class="memproto"> 188226031Sstas <table class="memname"> 189226031Sstas <tr> 190226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_keyblock </td> 191226031Sstas <td>(</td> 192226031Sstas <td class="paramtype">krb5_context </td> 193226031Sstas <td class="paramname"> <em>context</em>, </td> 194226031Sstas </tr> 195226031Sstas <tr> 196226031Sstas <td class="paramkey"></td> 197226031Sstas <td></td> 198226031Sstas <td class="paramtype">const krb5_keyblock * </td> 199226031Sstas <td class="paramname"> <em>inblock</em>, </td> 200226031Sstas </tr> 201226031Sstas <tr> 202226031Sstas <td class="paramkey"></td> 203226031Sstas <td></td> 204226031Sstas <td class="paramtype">krb5_keyblock ** </td> 205226031Sstas <td class="paramname"> <em>to</em></td><td> </td> 206226031Sstas </tr> 207226031Sstas <tr> 208226031Sstas <td></td> 209226031Sstas <td>)</td> 210226031Sstas <td></td><td></td><td></td> 211226031Sstas </tr> 212226031Sstas </table> 213226031Sstas</div> 214226031Sstas<div class="memdoc"> 215226031Sstas 216226031Sstas<p> 217226031SstasCopy a keyblock, free the output keyblock with <a class="el" href="group__krb5__crypto.html#g2e434abf56e7d7852358e11cdab0bb33">krb5_free_keyblock()</a>.<p> 218226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 219226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 220226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>a Kerberos 5 context </td></tr> 221226031Sstas <tr><td valign="top"></td><td valign="top"><em>inblock</em> </td><td>the key to copy </td></tr> 222226031Sstas <tr><td valign="top"></td><td valign="top"><em>to</em> </td><td>the output key.</td></tr> 223226031Sstas </table> 224226031Sstas</dl> 225226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success or a Kerberos 5 error code </dd></dl> 226226031Sstas 227226031Sstas</div> 228226031Sstas</div><p> 229226031Sstas<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)" --> 230226031Sstas<div class="memitem"> 231226031Sstas<div class="memproto"> 232226031Sstas <table class="memname"> 233226031Sstas <tr> 234226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_keyblock_contents </td> 235226031Sstas <td>(</td> 236226031Sstas <td class="paramtype">krb5_context </td> 237226031Sstas <td class="paramname"> <em>context</em>, </td> 238226031Sstas </tr> 239226031Sstas <tr> 240226031Sstas <td class="paramkey"></td> 241226031Sstas <td></td> 242226031Sstas <td class="paramtype">const krb5_keyblock * </td> 243226031Sstas <td class="paramname"> <em>inblock</em>, </td> 244226031Sstas </tr> 245226031Sstas <tr> 246226031Sstas <td class="paramkey"></td> 247226031Sstas <td></td> 248226031Sstas <td class="paramtype">krb5_keyblock * </td> 249226031Sstas <td class="paramname"> <em>to</em></td><td> </td> 250226031Sstas </tr> 251226031Sstas <tr> 252226031Sstas <td></td> 253226031Sstas <td>)</td> 254226031Sstas <td></td><td></td><td></td> 255226031Sstas </tr> 256226031Sstas </table> 257226031Sstas</div> 258226031Sstas<div class="memdoc"> 259226031Sstas 260226031Sstas<p> 261226031SstasCopy a keyblock, free the output keyblock with <a class="el" href="group__krb5__crypto.html#g66d5d8067358373fdab46987503f2398">krb5_free_keyblock_contents()</a>.<p> 262226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 263226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 264226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>a Kerberos 5 context </td></tr> 265226031Sstas <tr><td valign="top"></td><td valign="top"><em>inblock</em> </td><td>the key to copy </td></tr> 266226031Sstas <tr><td valign="top"></td><td valign="top"><em>to</em> </td><td>the output key.</td></tr> 267226031Sstas </table> 268226031Sstas</dl> 269226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success or a Kerberos 5 error code </dd></dl> 270226031Sstas 271226031Sstas</div> 272226031Sstas</div><p> 273226031Sstas<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)" --> 274226031Sstas<div class="memitem"> 275226031Sstas<div class="memproto"> 276226031Sstas <table class="memname"> 277226031Sstas <tr> 278226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_create_checksum_iov </td> 279226031Sstas <td>(</td> 280226031Sstas <td class="paramtype">krb5_context </td> 281226031Sstas <td class="paramname"> <em>context</em>, </td> 282226031Sstas </tr> 283226031Sstas <tr> 284226031Sstas <td class="paramkey"></td> 285226031Sstas <td></td> 286226031Sstas <td class="paramtype">krb5_crypto </td> 287226031Sstas <td class="paramname"> <em>crypto</em>, </td> 288226031Sstas </tr> 289226031Sstas <tr> 290226031Sstas <td class="paramkey"></td> 291226031Sstas <td></td> 292226031Sstas <td class="paramtype">unsigned </td> 293226031Sstas <td class="paramname"> <em>usage</em>, </td> 294226031Sstas </tr> 295226031Sstas <tr> 296226031Sstas <td class="paramkey"></td> 297226031Sstas <td></td> 298226031Sstas <td class="paramtype"><a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> * </td> 299226031Sstas <td class="paramname"> <em>data</em>, </td> 300226031Sstas </tr> 301226031Sstas <tr> 302226031Sstas <td class="paramkey"></td> 303226031Sstas <td></td> 304226031Sstas <td class="paramtype">unsigned int </td> 305226031Sstas <td class="paramname"> <em>num_data</em>, </td> 306226031Sstas </tr> 307226031Sstas <tr> 308226031Sstas <td class="paramkey"></td> 309226031Sstas <td></td> 310226031Sstas <td class="paramtype">krb5_cksumtype * </td> 311226031Sstas <td class="paramname"> <em>type</em></td><td> </td> 312226031Sstas </tr> 313226031Sstas <tr> 314226031Sstas <td></td> 315226031Sstas <td>)</td> 316226031Sstas <td></td><td></td><td></td> 317226031Sstas </tr> 318226031Sstas </table> 319226031Sstas</div> 320226031Sstas<div class="memdoc"> 321226031Sstas 322226031Sstas<p> 323226031SstasCreate a Kerberos message checksum.<p> 324226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 325226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 326226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 327226031Sstas <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>Kerberos crypto context </td></tr> 328226031Sstas <tr><td valign="top"></td><td valign="top"><em>usage</em> </td><td>Key usage for this buffer </td></tr> 329226031Sstas <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>array of buffers to process </td></tr> 330226031Sstas <tr><td valign="top"></td><td valign="top"><em>num_data</em> </td><td>length of array </td></tr> 331226031Sstas <tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>output data</td></tr> 332226031Sstas </table> 333226031Sstas</dl> 334226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 335226031Sstas 336226031Sstas</div> 337226031Sstas</div><p> 338226031Sstas<a class="anchor" name="g57eaed735baab9eb3c3740be8e4d2137"></a><!-- doxytag: member="crypto.c::krb5_crypto_destroy" ref="g57eaed735baab9eb3c3740be8e4d2137" args="(krb5_context context, krb5_crypto crypto)" --> 339226031Sstas<div class="memitem"> 340226031Sstas<div class="memproto"> 341226031Sstas <table class="memname"> 342226031Sstas <tr> 343226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_destroy </td> 344226031Sstas <td>(</td> 345226031Sstas <td class="paramtype">krb5_context </td> 346226031Sstas <td class="paramname"> <em>context</em>, </td> 347226031Sstas </tr> 348226031Sstas <tr> 349226031Sstas <td class="paramkey"></td> 350226031Sstas <td></td> 351226031Sstas <td class="paramtype">krb5_crypto </td> 352226031Sstas <td class="paramname"> <em>crypto</em></td><td> </td> 353226031Sstas </tr> 354226031Sstas <tr> 355226031Sstas <td></td> 356226031Sstas <td>)</td> 357226031Sstas <td></td><td></td><td></td> 358226031Sstas </tr> 359226031Sstas </table> 360226031Sstas</div> 361226031Sstas<div class="memdoc"> 362226031Sstas 363226031Sstas<p> 364226031SstasFree a crypto context created by <a class="el" href="group__krb5__crypto.html#gd7003a8a81cef633cc0a2cc07c93dd32">krb5_crypto_init()</a>.<p> 365226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 366226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 367226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 368226031Sstas <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>crypto context to free</td></tr> 369226031Sstas </table> 370226031Sstas</dl> 371226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 372226031Sstas 373226031Sstas</div> 374226031Sstas</div><p> 375226031Sstas<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)" --> 376226031Sstas<div class="memitem"> 377226031Sstas<div class="memproto"> 378226031Sstas <table class="memname"> 379226031Sstas <tr> 380226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_fx_cf2 </td> 381226031Sstas <td>(</td> 382226031Sstas <td class="paramtype">krb5_context </td> 383226031Sstas <td class="paramname"> <em>context</em>, </td> 384226031Sstas </tr> 385226031Sstas <tr> 386226031Sstas <td class="paramkey"></td> 387226031Sstas <td></td> 388226031Sstas <td class="paramtype">const krb5_crypto </td> 389226031Sstas <td class="paramname"> <em>crypto1</em>, </td> 390226031Sstas </tr> 391226031Sstas <tr> 392226031Sstas <td class="paramkey"></td> 393226031Sstas <td></td> 394226031Sstas <td class="paramtype">const krb5_crypto </td> 395226031Sstas <td class="paramname"> <em>crypto2</em>, </td> 396226031Sstas </tr> 397226031Sstas <tr> 398226031Sstas <td class="paramkey"></td> 399226031Sstas <td></td> 400226031Sstas <td class="paramtype">krb5_data * </td> 401226031Sstas <td class="paramname"> <em>pepper1</em>, </td> 402226031Sstas </tr> 403226031Sstas <tr> 404226031Sstas <td class="paramkey"></td> 405226031Sstas <td></td> 406226031Sstas <td class="paramtype">krb5_data * </td> 407226031Sstas <td class="paramname"> <em>pepper2</em>, </td> 408226031Sstas </tr> 409226031Sstas <tr> 410226031Sstas <td class="paramkey"></td> 411226031Sstas <td></td> 412226031Sstas <td class="paramtype">krb5_enctype </td> 413226031Sstas <td class="paramname"> <em>enctype</em>, </td> 414226031Sstas </tr> 415226031Sstas <tr> 416226031Sstas <td class="paramkey"></td> 417226031Sstas <td></td> 418226031Sstas <td class="paramtype">krb5_keyblock * </td> 419226031Sstas <td class="paramname"> <em>res</em></td><td> </td> 420226031Sstas </tr> 421226031Sstas <tr> 422226031Sstas <td></td> 423226031Sstas <td>)</td> 424226031Sstas <td></td><td></td><td></td> 425226031Sstas </tr> 426226031Sstas </table> 427226031Sstas</div> 428226031Sstas<div class="memdoc"> 429226031Sstas 430226031Sstas<p> 431226031SstasThe FX-CF2 key derivation function, used in FAST and preauth framework.<p> 432226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 433226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 434226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr> 435226031Sstas <tr><td valign="top"></td><td valign="top"><em>crypto1</em> </td><td>first key to combine </td></tr> 436226031Sstas <tr><td valign="top"></td><td valign="top"><em>crypto2</em> </td><td>second key to combine </td></tr> 437226031Sstas <tr><td valign="top"></td><td valign="top"><em>pepper1</em> </td><td>factor to combine with first key to garante uniqueness </td></tr> 438226031Sstas <tr><td valign="top"></td><td valign="top"><em>pepper2</em> </td><td>factor to combine with second key to garante uniqueness </td></tr> 439226031Sstas <tr><td valign="top"></td><td valign="top"><em>enctype</em> </td><td>the encryption type of the resulting key </td></tr> 440226031Sstas <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> 441226031Sstas </table> 442226031Sstas</dl> 443226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 444226031Sstas 445226031Sstas</div> 446226031Sstas</div><p> 447226031Sstas<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)" --> 448226031Sstas<div class="memitem"> 449226031Sstas<div class="memproto"> 450226031Sstas <table class="memname"> 451226031Sstas <tr> 452226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getblocksize </td> 453226031Sstas <td>(</td> 454226031Sstas <td class="paramtype">krb5_context </td> 455226031Sstas <td class="paramname"> <em>context</em>, </td> 456226031Sstas </tr> 457226031Sstas <tr> 458226031Sstas <td class="paramkey"></td> 459226031Sstas <td></td> 460226031Sstas <td class="paramtype">krb5_crypto </td> 461226031Sstas <td class="paramname"> <em>crypto</em>, </td> 462226031Sstas </tr> 463226031Sstas <tr> 464226031Sstas <td class="paramkey"></td> 465226031Sstas <td></td> 466226031Sstas <td class="paramtype">size_t * </td> 467226031Sstas <td class="paramname"> <em>blocksize</em></td><td> </td> 468226031Sstas </tr> 469226031Sstas <tr> 470226031Sstas <td></td> 471226031Sstas <td>)</td> 472226031Sstas <td></td><td></td><td></td> 473226031Sstas </tr> 474226031Sstas </table> 475226031Sstas</div> 476226031Sstas<div class="memdoc"> 477226031Sstas 478226031Sstas<p> 479226031SstasReturn the blocksize used algorithm referenced by the crypto context<p> 480226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 481226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 482226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 483226031Sstas <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>crypto context to query </td></tr> 484226031Sstas <tr><td valign="top"></td><td valign="top"><em>blocksize</em> </td><td>the resulting blocksize</td></tr> 485226031Sstas </table> 486226031Sstas</dl> 487226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 488226031Sstas 489226031Sstas</div> 490226031Sstas</div><p> 491226031Sstas<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)" --> 492226031Sstas<div class="memitem"> 493226031Sstas<div class="memproto"> 494226031Sstas <table class="memname"> 495226031Sstas <tr> 496226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getconfoundersize </td> 497226031Sstas <td>(</td> 498226031Sstas <td class="paramtype">krb5_context </td> 499226031Sstas <td class="paramname"> <em>context</em>, </td> 500226031Sstas </tr> 501226031Sstas <tr> 502226031Sstas <td class="paramkey"></td> 503226031Sstas <td></td> 504226031Sstas <td class="paramtype">krb5_crypto </td> 505226031Sstas <td class="paramname"> <em>crypto</em>, </td> 506226031Sstas </tr> 507226031Sstas <tr> 508226031Sstas <td class="paramkey"></td> 509226031Sstas <td></td> 510226031Sstas <td class="paramtype">size_t * </td> 511226031Sstas <td class="paramname"> <em>confoundersize</em></td><td> </td> 512226031Sstas </tr> 513226031Sstas <tr> 514226031Sstas <td></td> 515226031Sstas <td>)</td> 516226031Sstas <td></td><td></td><td></td> 517226031Sstas </tr> 518226031Sstas </table> 519226031Sstas</div> 520226031Sstas<div class="memdoc"> 521226031Sstas 522226031Sstas<p> 523226031SstasReturn the confounder size used by the crypto context<p> 524226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 525226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 526226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 527226031Sstas <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>crypto context to query </td></tr> 528226031Sstas <tr><td valign="top"></td><td valign="top"><em>confoundersize</em> </td><td>the returned confounder size</td></tr> 529226031Sstas </table> 530226031Sstas</dl> 531226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 532226031Sstas 533226031Sstas</div> 534226031Sstas</div><p> 535226031Sstas<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)" --> 536226031Sstas<div class="memitem"> 537226031Sstas<div class="memproto"> 538226031Sstas <table class="memname"> 539226031Sstas <tr> 540226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getenctype </td> 541226031Sstas <td>(</td> 542226031Sstas <td class="paramtype">krb5_context </td> 543226031Sstas <td class="paramname"> <em>context</em>, </td> 544226031Sstas </tr> 545226031Sstas <tr> 546226031Sstas <td class="paramkey"></td> 547226031Sstas <td></td> 548226031Sstas <td class="paramtype">krb5_crypto </td> 549226031Sstas <td class="paramname"> <em>crypto</em>, </td> 550226031Sstas </tr> 551226031Sstas <tr> 552226031Sstas <td class="paramkey"></td> 553226031Sstas <td></td> 554226031Sstas <td class="paramtype">krb5_enctype * </td> 555226031Sstas <td class="paramname"> <em>enctype</em></td><td> </td> 556226031Sstas </tr> 557226031Sstas <tr> 558226031Sstas <td></td> 559226031Sstas <td>)</td> 560226031Sstas <td></td><td></td><td></td> 561226031Sstas </tr> 562226031Sstas </table> 563226031Sstas</div> 564226031Sstas<div class="memdoc"> 565226031Sstas 566226031Sstas<p> 567226031SstasReturn the encryption type used by the crypto context<p> 568226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 569226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 570226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 571226031Sstas <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>crypto context to query </td></tr> 572226031Sstas <tr><td valign="top"></td><td valign="top"><em>enctype</em> </td><td>the resulting encryption type</td></tr> 573226031Sstas </table> 574226031Sstas</dl> 575226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 576226031Sstas 577226031Sstas</div> 578226031Sstas</div><p> 579226031Sstas<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)" --> 580226031Sstas<div class="memitem"> 581226031Sstas<div class="memproto"> 582226031Sstas <table class="memname"> 583226031Sstas <tr> 584226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getpadsize </td> 585226031Sstas <td>(</td> 586226031Sstas <td class="paramtype">krb5_context </td> 587226031Sstas <td class="paramname"> <em>context</em>, </td> 588226031Sstas </tr> 589226031Sstas <tr> 590226031Sstas <td class="paramkey"></td> 591226031Sstas <td></td> 592226031Sstas <td class="paramtype">krb5_crypto </td> 593226031Sstas <td class="paramname"> <em>crypto</em>, </td> 594226031Sstas </tr> 595226031Sstas <tr> 596226031Sstas <td class="paramkey"></td> 597226031Sstas <td></td> 598226031Sstas <td class="paramtype">size_t * </td> 599226031Sstas <td class="paramname"> <em>padsize</em></td><td> </td> 600226031Sstas </tr> 601226031Sstas <tr> 602226031Sstas <td></td> 603226031Sstas <td>)</td> 604226031Sstas <td></td><td></td><td></td> 605226031Sstas </tr> 606226031Sstas </table> 607226031Sstas</div> 608226031Sstas<div class="memdoc"> 609226031Sstas 610226031Sstas<p> 611226031SstasReturn the padding size used by the crypto context<p> 612226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 613226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 614226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 615226031Sstas <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>crypto context to query </td></tr> 616226031Sstas <tr><td valign="top"></td><td valign="top"><em>padsize</em> </td><td>the return padding size</td></tr> 617226031Sstas </table> 618226031Sstas</dl> 619226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 620226031Sstas 621226031Sstas</div> 622226031Sstas</div><p> 623226031Sstas<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)" --> 624226031Sstas<div class="memitem"> 625226031Sstas<div class="memproto"> 626226031Sstas <table class="memname"> 627226031Sstas <tr> 628226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_init </td> 629226031Sstas <td>(</td> 630226031Sstas <td class="paramtype">krb5_context </td> 631226031Sstas <td class="paramname"> <em>context</em>, </td> 632226031Sstas </tr> 633226031Sstas <tr> 634226031Sstas <td class="paramkey"></td> 635226031Sstas <td></td> 636226031Sstas <td class="paramtype">const krb5_keyblock * </td> 637226031Sstas <td class="paramname"> <em>key</em>, </td> 638226031Sstas </tr> 639226031Sstas <tr> 640226031Sstas <td class="paramkey"></td> 641226031Sstas <td></td> 642226031Sstas <td class="paramtype">krb5_enctype </td> 643226031Sstas <td class="paramname"> <em>etype</em>, </td> 644226031Sstas </tr> 645226031Sstas <tr> 646226031Sstas <td class="paramkey"></td> 647226031Sstas <td></td> 648226031Sstas <td class="paramtype">krb5_crypto * </td> 649226031Sstas <td class="paramname"> <em>crypto</em></td><td> </td> 650226031Sstas </tr> 651226031Sstas <tr> 652226031Sstas <td></td> 653226031Sstas <td>)</td> 654226031Sstas <td></td><td></td><td></td> 655226031Sstas </tr> 656226031Sstas </table> 657226031Sstas</div> 658226031Sstas<div class="memdoc"> 659226031Sstas 660226031Sstas<p> 661226031SstasCreate 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> 662226031SstasTo free the crypto context, use <a class="el" href="group__krb5__crypto.html#g57eaed735baab9eb3c3740be8e4d2137">krb5_crypto_destroy()</a>.<p> 663226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 664226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 665226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 666226031Sstas <tr><td valign="top"></td><td valign="top"><em>key</em> </td><td>the key block information with all key data </td></tr> 667226031Sstas <tr><td valign="top"></td><td valign="top"><em>etype</em> </td><td>the encryption type </td></tr> 668226031Sstas <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>the resulting crypto context</td></tr> 669226031Sstas </table> 670226031Sstas</dl> 671226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 672226031Sstas 673226031Sstas</div> 674226031Sstas</div><p> 675226031Sstas<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)" --> 676226031Sstas<div class="memitem"> 677226031Sstas<div class="memproto"> 678226031Sstas <table class="memname"> 679226031Sstas <tr> 680226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_decrypt_iov_ivec </td> 681226031Sstas <td>(</td> 682226031Sstas <td class="paramtype">krb5_context </td> 683226031Sstas <td class="paramname"> <em>context</em>, </td> 684226031Sstas </tr> 685226031Sstas <tr> 686226031Sstas <td class="paramkey"></td> 687226031Sstas <td></td> 688226031Sstas <td class="paramtype">krb5_crypto </td> 689226031Sstas <td class="paramname"> <em>crypto</em>, </td> 690226031Sstas </tr> 691226031Sstas <tr> 692226031Sstas <td class="paramkey"></td> 693226031Sstas <td></td> 694226031Sstas <td class="paramtype">unsigned </td> 695226031Sstas <td class="paramname"> <em>usage</em>, </td> 696226031Sstas </tr> 697226031Sstas <tr> 698226031Sstas <td class="paramkey"></td> 699226031Sstas <td></td> 700226031Sstas <td class="paramtype"><a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> * </td> 701226031Sstas <td class="paramname"> <em>data</em>, </td> 702226031Sstas </tr> 703226031Sstas <tr> 704226031Sstas <td class="paramkey"></td> 705226031Sstas <td></td> 706226031Sstas <td class="paramtype">unsigned int </td> 707226031Sstas <td class="paramname"> <em>num_data</em>, </td> 708226031Sstas </tr> 709226031Sstas <tr> 710226031Sstas <td class="paramkey"></td> 711226031Sstas <td></td> 712226031Sstas <td class="paramtype">void * </td> 713226031Sstas <td class="paramname"> <em>ivec</em></td><td> </td> 714226031Sstas </tr> 715226031Sstas <tr> 716226031Sstas <td></td> 717226031Sstas <td>)</td> 718226031Sstas <td></td><td></td><td></td> 719226031Sstas </tr> 720226031Sstas </table> 721226031Sstas</div> 722226031Sstas<div class="memdoc"> 723226031Sstas 724226031Sstas<p> 725226031SstasInline decrypt a Kerberos message.<p> 726226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 727226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 728226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 729226031Sstas <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>Kerberos crypto context </td></tr> 730226031Sstas <tr><td valign="top"></td><td valign="top"><em>usage</em> </td><td>Key usage for this buffer </td></tr> 731226031Sstas <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>array of buffers to process </td></tr> 732226031Sstas <tr><td valign="top"></td><td valign="top"><em>num_data</em> </td><td>length of array </td></tr> 733226031Sstas <tr><td valign="top"></td><td valign="top"><em>ivec</em> </td><td>initial cbc/cts vector</td></tr> 734226031Sstas </table> 735226031Sstas</dl> 736226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0.</dd></dl> 737226031Sstas1. 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. 738226031Sstas</div> 739226031Sstas</div><p> 740226031Sstas<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)" --> 741226031Sstas<div class="memitem"> 742226031Sstas<div class="memproto"> 743226031Sstas <table class="memname"> 744226031Sstas <tr> 745226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_encrypt_iov_ivec </td> 746226031Sstas <td>(</td> 747226031Sstas <td class="paramtype">krb5_context </td> 748226031Sstas <td class="paramname"> <em>context</em>, </td> 749226031Sstas </tr> 750226031Sstas <tr> 751226031Sstas <td class="paramkey"></td> 752226031Sstas <td></td> 753226031Sstas <td class="paramtype">krb5_crypto </td> 754226031Sstas <td class="paramname"> <em>crypto</em>, </td> 755226031Sstas </tr> 756226031Sstas <tr> 757226031Sstas <td class="paramkey"></td> 758226031Sstas <td></td> 759226031Sstas <td class="paramtype">unsigned </td> 760226031Sstas <td class="paramname"> <em>usage</em>, </td> 761226031Sstas </tr> 762226031Sstas <tr> 763226031Sstas <td class="paramkey"></td> 764226031Sstas <td></td> 765226031Sstas <td class="paramtype"><a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> * </td> 766226031Sstas <td class="paramname"> <em>data</em>, </td> 767226031Sstas </tr> 768226031Sstas <tr> 769226031Sstas <td class="paramkey"></td> 770226031Sstas <td></td> 771226031Sstas <td class="paramtype">int </td> 772226031Sstas <td class="paramname"> <em>num_data</em>, </td> 773226031Sstas </tr> 774226031Sstas <tr> 775226031Sstas <td class="paramkey"></td> 776226031Sstas <td></td> 777226031Sstas <td class="paramtype">void * </td> 778226031Sstas <td class="paramname"> <em>ivec</em></td><td> </td> 779226031Sstas </tr> 780226031Sstas <tr> 781226031Sstas <td></td> 782226031Sstas <td>)</td> 783226031Sstas <td></td><td></td><td></td> 784226031Sstas </tr> 785226031Sstas </table> 786226031Sstas</div> 787226031Sstas<div class="memdoc"> 788226031Sstas 789226031Sstas<p> 790226031SstasInline encrypt a kerberos message<p> 791226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 792226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 793226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 794226031Sstas <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>Kerberos crypto context </td></tr> 795226031Sstas <tr><td valign="top"></td><td valign="top"><em>usage</em> </td><td>Key usage for this buffer </td></tr> 796226031Sstas <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>array of buffers to process </td></tr> 797226031Sstas <tr><td valign="top"></td><td valign="top"><em>num_data</em> </td><td>length of array </td></tr> 798226031Sstas <tr><td valign="top"></td><td valign="top"><em>ivec</em> </td><td>initial cbc/cts vector</td></tr> 799226031Sstas </table> 800226031Sstas</dl> 801226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0.</dd></dl> 802226031SstasKerberos encrypted data look like this:<p> 803226031Sstas1. 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 804226031Sstas</div> 805226031Sstas</div><p> 806226031Sstas<a class="anchor" name="g77acfc640aa003095ea5890de2ea1cb7"></a><!-- doxytag: member="crypto.c::krb5_enctype_disable" ref="g77acfc640aa003095ea5890de2ea1cb7" args="(krb5_context context, krb5_enctype enctype)" --> 807226031Sstas<div class="memitem"> 808226031Sstas<div class="memproto"> 809226031Sstas <table class="memname"> 810226031Sstas <tr> 811226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_enctype_disable </td> 812226031Sstas <td>(</td> 813226031Sstas <td class="paramtype">krb5_context </td> 814226031Sstas <td class="paramname"> <em>context</em>, </td> 815226031Sstas </tr> 816226031Sstas <tr> 817226031Sstas <td class="paramkey"></td> 818226031Sstas <td></td> 819226031Sstas <td class="paramtype">krb5_enctype </td> 820226031Sstas <td class="paramname"> <em>enctype</em></td><td> </td> 821226031Sstas </tr> 822226031Sstas <tr> 823226031Sstas <td></td> 824226031Sstas <td>)</td> 825226031Sstas <td></td><td></td><td></td> 826226031Sstas </tr> 827226031Sstas </table> 828226031Sstas</div> 829226031Sstas<div class="memdoc"> 830226031Sstas 831226031Sstas<p> 832226031SstasDisable encryption type<p> 833226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 834226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 835226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr> 836226031Sstas <tr><td valign="top"></td><td valign="top"><em>enctype</em> </td><td>encryption type to disable</td></tr> 837226031Sstas </table> 838226031Sstas</dl> 839226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 840226031Sstas 841226031Sstas</div> 842226031Sstas</div><p> 843226031Sstas<a class="anchor" name="g8dfebc785c059e38c22c6ca34ed5f68a"></a><!-- doxytag: member="crypto.c::krb5_enctype_enable" ref="g8dfebc785c059e38c22c6ca34ed5f68a" args="(krb5_context context, krb5_enctype enctype)" --> 844226031Sstas<div class="memitem"> 845226031Sstas<div class="memproto"> 846226031Sstas <table class="memname"> 847226031Sstas <tr> 848226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_enctype_enable </td> 849226031Sstas <td>(</td> 850226031Sstas <td class="paramtype">krb5_context </td> 851226031Sstas <td class="paramname"> <em>context</em>, </td> 852226031Sstas </tr> 853226031Sstas <tr> 854226031Sstas <td class="paramkey"></td> 855226031Sstas <td></td> 856226031Sstas <td class="paramtype">krb5_enctype </td> 857226031Sstas <td class="paramname"> <em>enctype</em></td><td> </td> 858226031Sstas </tr> 859226031Sstas <tr> 860226031Sstas <td></td> 861226031Sstas <td>)</td> 862226031Sstas <td></td><td></td><td></td> 863226031Sstas </tr> 864226031Sstas </table> 865226031Sstas</div> 866226031Sstas<div class="memdoc"> 867226031Sstas 868226031Sstas<p> 869226031SstasEnable encryption type<p> 870226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 871226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 872226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr> 873226031Sstas <tr><td valign="top"></td><td valign="top"><em>enctype</em> </td><td>encryption type to enable</td></tr> 874226031Sstas </table> 875226031Sstas</dl> 876226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 877226031Sstas 878226031Sstas</div> 879226031Sstas</div><p> 880226031Sstas<a class="anchor" name="gd5f2b15d5fde369cf923e8fae4b00bec"></a><!-- doxytag: member="crypto.c::krb5_enctype_valid" ref="gd5f2b15d5fde369cf923e8fae4b00bec" args="(krb5_context context, krb5_enctype etype)" --> 881226031Sstas<div class="memitem"> 882226031Sstas<div class="memproto"> 883226031Sstas <table class="memname"> 884226031Sstas <tr> 885226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_enctype_valid </td> 886226031Sstas <td>(</td> 887226031Sstas <td class="paramtype">krb5_context </td> 888226031Sstas <td class="paramname"> <em>context</em>, </td> 889226031Sstas </tr> 890226031Sstas <tr> 891226031Sstas <td class="paramkey"></td> 892226031Sstas <td></td> 893226031Sstas <td class="paramtype">krb5_enctype </td> 894226031Sstas <td class="paramname"> <em>etype</em></td><td> </td> 895226031Sstas </tr> 896226031Sstas <tr> 897226031Sstas <td></td> 898226031Sstas <td>)</td> 899226031Sstas <td></td><td></td><td></td> 900226031Sstas </tr> 901226031Sstas </table> 902226031Sstas</div> 903226031Sstas<div class="memdoc"> 904226031Sstas 905226031Sstas<p> 906226031SstasCheck if a enctype is valid, return 0 if it is.<p> 907226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 908226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 909226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 910226031Sstas <tr><td valign="top"></td><td valign="top"><em>etype</em> </td><td>enctype to check if its valid or not</td></tr> 911226031Sstas </table> 912226031Sstas</dl> 913226031Sstas<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> 914226031Sstas 915226031Sstas</div> 916226031Sstas</div><p> 917226031Sstas<a class="anchor" name="g2e434abf56e7d7852358e11cdab0bb33"></a><!-- doxytag: member="keyblock.c::krb5_free_keyblock" ref="g2e434abf56e7d7852358e11cdab0bb33" args="(krb5_context context, krb5_keyblock *keyblock)" --> 918226031Sstas<div class="memitem"> 919226031Sstas<div class="memproto"> 920226031Sstas <table class="memname"> 921226031Sstas <tr> 922226031Sstas <td class="memname">KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_keyblock </td> 923226031Sstas <td>(</td> 924226031Sstas <td class="paramtype">krb5_context </td> 925226031Sstas <td class="paramname"> <em>context</em>, </td> 926226031Sstas </tr> 927226031Sstas <tr> 928226031Sstas <td class="paramkey"></td> 929226031Sstas <td></td> 930226031Sstas <td class="paramtype">krb5_keyblock * </td> 931226031Sstas <td class="paramname"> <em>keyblock</em></td><td> </td> 932226031Sstas </tr> 933226031Sstas <tr> 934226031Sstas <td></td> 935226031Sstas <td>)</td> 936226031Sstas <td></td><td></td><td></td> 937226031Sstas </tr> 938226031Sstas </table> 939226031Sstas</div> 940226031Sstas<div class="memdoc"> 941226031Sstas 942226031Sstas<p> 943226031SstasFree 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> 944226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 945226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 946226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>a Kerberos 5 context </td></tr> 947226031Sstas <tr><td valign="top"></td><td valign="top"><em>keyblock</em> </td><td>keyblock to free, NULL is valid argument </td></tr> 948226031Sstas </table> 949226031Sstas</dl> 950226031Sstas 951226031Sstas</div> 952226031Sstas</div><p> 953226031Sstas<a class="anchor" name="g66d5d8067358373fdab46987503f2398"></a><!-- doxytag: member="keyblock.c::krb5_free_keyblock_contents" ref="g66d5d8067358373fdab46987503f2398" args="(krb5_context context, krb5_keyblock *keyblock)" --> 954226031Sstas<div class="memitem"> 955226031Sstas<div class="memproto"> 956226031Sstas <table class="memname"> 957226031Sstas <tr> 958226031Sstas <td class="memname">KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_keyblock_contents </td> 959226031Sstas <td>(</td> 960226031Sstas <td class="paramtype">krb5_context </td> 961226031Sstas <td class="paramname"> <em>context</em>, </td> 962226031Sstas </tr> 963226031Sstas <tr> 964226031Sstas <td class="paramkey"></td> 965226031Sstas <td></td> 966226031Sstas <td class="paramtype">krb5_keyblock * </td> 967226031Sstas <td class="paramname"> <em>keyblock</em></td><td> </td> 968226031Sstas </tr> 969226031Sstas <tr> 970226031Sstas <td></td> 971226031Sstas <td>)</td> 972226031Sstas <td></td><td></td><td></td> 973226031Sstas </tr> 974226031Sstas </table> 975226031Sstas</div> 976226031Sstas<div class="memdoc"> 977226031Sstas 978226031Sstas<p> 979226031SstasFree a keyblock's content, also zero out the content of the keyblock.<p> 980226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 981226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 982226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>a Kerberos 5 context </td></tr> 983226031Sstas <tr><td valign="top"></td><td valign="top"><em>keyblock</em> </td><td>keyblock content to free, NULL is valid argument </td></tr> 984226031Sstas </table> 985226031Sstas</dl> 986226031Sstas 987226031Sstas</div> 988226031Sstas</div><p> 989226031Sstas<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)" --> 990226031Sstas<div class="memitem"> 991226031Sstas<div class="memproto"> 992226031Sstas <table class="memname"> 993226031Sstas <tr> 994226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_generate_subkey_extended </td> 995226031Sstas <td>(</td> 996226031Sstas <td class="paramtype">krb5_context </td> 997226031Sstas <td class="paramname"> <em>context</em>, </td> 998226031Sstas </tr> 999226031Sstas <tr> 1000226031Sstas <td class="paramkey"></td> 1001226031Sstas <td></td> 1002226031Sstas <td class="paramtype">const krb5_keyblock * </td> 1003226031Sstas <td class="paramname"> <em>key</em>, </td> 1004226031Sstas </tr> 1005226031Sstas <tr> 1006226031Sstas <td class="paramkey"></td> 1007226031Sstas <td></td> 1008226031Sstas <td class="paramtype">krb5_enctype </td> 1009226031Sstas <td class="paramname"> <em>etype</em>, </td> 1010226031Sstas </tr> 1011226031Sstas <tr> 1012226031Sstas <td class="paramkey"></td> 1013226031Sstas <td></td> 1014226031Sstas <td class="paramtype">krb5_keyblock ** </td> 1015226031Sstas <td class="paramname"> <em>subkey</em></td><td> </td> 1016226031Sstas </tr> 1017226031Sstas <tr> 1018226031Sstas <td></td> 1019226031Sstas <td>)</td> 1020226031Sstas <td></td><td></td><td></td> 1021226031Sstas </tr> 1022226031Sstas </table> 1023226031Sstas</div> 1024226031Sstas<div class="memdoc"> 1025226031Sstas 1026226031Sstas<p> 1027226031SstasGenerate subkey, from keyblock<p> 1028226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 1029226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 1030226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>kerberos context </td></tr> 1031226031Sstas <tr><td valign="top"></td><td valign="top"><em>key</em> </td><td>session key </td></tr> 1032226031Sstas <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> 1033226031Sstas <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> 1034226031Sstas </table> 1035226031Sstas</dl> 1036226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success or a Kerberos 5 error code </dd></dl> 1037226031Sstas 1038226031Sstas</div> 1039226031Sstas</div><p> 1040226031Sstas<a class="anchor" name="ga2caa584d5a6f0bbba3e1bae7255be5c"></a><!-- doxytag: member="keyblock.c::krb5_keyblock_get_enctype" ref="ga2caa584d5a6f0bbba3e1bae7255be5c" args="(const krb5_keyblock *block)" --> 1041226031Sstas<div class="memitem"> 1042226031Sstas<div class="memproto"> 1043226031Sstas <table class="memname"> 1044226031Sstas <tr> 1045226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_enctype KRB5_LIB_CALL krb5_keyblock_get_enctype </td> 1046226031Sstas <td>(</td> 1047226031Sstas <td class="paramtype">const krb5_keyblock * </td> 1048226031Sstas <td class="paramname"> <em>block</em> </td> 1049226031Sstas <td> ) </td> 1050226031Sstas <td></td> 1051226031Sstas </tr> 1052226031Sstas </table> 1053226031Sstas</div> 1054226031Sstas<div class="memdoc"> 1055226031Sstas 1056226031Sstas<p> 1057226031SstasGet encryption type of a keyblock. 1058226031Sstas</div> 1059226031Sstas</div><p> 1060226031Sstas<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)" --> 1061226031Sstas<div class="memitem"> 1062226031Sstas<div class="memproto"> 1063226031Sstas <table class="memname"> 1064226031Sstas <tr> 1065226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_keyblock_init </td> 1066226031Sstas <td>(</td> 1067226031Sstas <td class="paramtype">krb5_context </td> 1068226031Sstas <td class="paramname"> <em>context</em>, </td> 1069226031Sstas </tr> 1070226031Sstas <tr> 1071226031Sstas <td class="paramkey"></td> 1072226031Sstas <td></td> 1073226031Sstas <td class="paramtype">krb5_enctype </td> 1074226031Sstas <td class="paramname"> <em>type</em>, </td> 1075226031Sstas </tr> 1076226031Sstas <tr> 1077226031Sstas <td class="paramkey"></td> 1078226031Sstas <td></td> 1079226031Sstas <td class="paramtype">const void * </td> 1080226031Sstas <td class="paramname"> <em>data</em>, </td> 1081226031Sstas </tr> 1082226031Sstas <tr> 1083226031Sstas <td class="paramkey"></td> 1084226031Sstas <td></td> 1085226031Sstas <td class="paramtype">size_t </td> 1086226031Sstas <td class="paramname"> <em>size</em>, </td> 1087226031Sstas </tr> 1088226031Sstas <tr> 1089226031Sstas <td class="paramkey"></td> 1090226031Sstas <td></td> 1091226031Sstas <td class="paramtype">krb5_keyblock * </td> 1092226031Sstas <td class="paramname"> <em>key</em></td><td> </td> 1093226031Sstas </tr> 1094226031Sstas <tr> 1095226031Sstas <td></td> 1096226031Sstas <td>)</td> 1097226031Sstas <td></td><td></td><td></td> 1098226031Sstas </tr> 1099226031Sstas </table> 1100226031Sstas</div> 1101226031Sstas<div class="memdoc"> 1102226031Sstas 1103226031Sstas<p> 1104226031SstasFill 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> 1105226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success or a Kerberos 5 error code </dd></dl> 1106226031Sstas 1107226031Sstas</div> 1108226031Sstas</div><p> 1109226031Sstas<a class="anchor" name="g33e1cb14ccab45ce46d51064caf07c10"></a><!-- doxytag: member="keyblock.c::krb5_keyblock_zero" ref="g33e1cb14ccab45ce46d51064caf07c10" args="(krb5_keyblock *keyblock)" --> 1110226031Sstas<div class="memitem"> 1111226031Sstas<div class="memproto"> 1112226031Sstas <table class="memname"> 1113226031Sstas <tr> 1114226031Sstas <td class="memname">KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_keyblock_zero </td> 1115226031Sstas <td>(</td> 1116226031Sstas <td class="paramtype">krb5_keyblock * </td> 1117226031Sstas <td class="paramname"> <em>keyblock</em> </td> 1118226031Sstas <td> ) </td> 1119226031Sstas <td></td> 1120226031Sstas </tr> 1121226031Sstas </table> 1122226031Sstas</div> 1123226031Sstas<div class="memdoc"> 1124226031Sstas 1125226031Sstas<p> 1126226031SstasZero out a keyblock<p> 1127226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 1128226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 1129226031Sstas <tr><td valign="top"></td><td valign="top"><em>keyblock</em> </td><td>keyblock to zero out </td></tr> 1130226031Sstas </table> 1131226031Sstas</dl> 1132226031Sstas 1133226031Sstas</div> 1134226031Sstas</div><p> 1135226031Sstas<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)" --> 1136226031Sstas<div class="memitem"> 1137226031Sstas<div class="memproto"> 1138226031Sstas <table class="memname"> 1139226031Sstas <tr> 1140226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_random_to_key </td> 1141226031Sstas <td>(</td> 1142226031Sstas <td class="paramtype">krb5_context </td> 1143226031Sstas <td class="paramname"> <em>context</em>, </td> 1144226031Sstas </tr> 1145226031Sstas <tr> 1146226031Sstas <td class="paramkey"></td> 1147226031Sstas <td></td> 1148226031Sstas <td class="paramtype">krb5_enctype </td> 1149226031Sstas <td class="paramname"> <em>type</em>, </td> 1150226031Sstas </tr> 1151226031Sstas <tr> 1152226031Sstas <td class="paramkey"></td> 1153226031Sstas <td></td> 1154226031Sstas <td class="paramtype">const void * </td> 1155226031Sstas <td class="paramname"> <em>data</em>, </td> 1156226031Sstas </tr> 1157226031Sstas <tr> 1158226031Sstas <td class="paramkey"></td> 1159226031Sstas <td></td> 1160226031Sstas <td class="paramtype">size_t </td> 1161226031Sstas <td class="paramname"> <em>size</em>, </td> 1162226031Sstas </tr> 1163226031Sstas <tr> 1164226031Sstas <td class="paramkey"></td> 1165226031Sstas <td></td> 1166226031Sstas <td class="paramtype">krb5_keyblock * </td> 1167226031Sstas <td class="paramname"> <em>key</em></td><td> </td> 1168226031Sstas </tr> 1169226031Sstas <tr> 1170226031Sstas <td></td> 1171226031Sstas <td>)</td> 1172226031Sstas <td></td><td></td><td></td> 1173226031Sstas </tr> 1174226031Sstas </table> 1175226031Sstas</div> 1176226031Sstas<div class="memdoc"> 1177226031Sstas 1178226031Sstas<p> 1179226031SstasConverts 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> 1180226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 1181226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 1182226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos 5 context </td></tr> 1183226031Sstas <tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>the enctype resulting key will be of </td></tr> 1184226031Sstas <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>input random data to convert to a key </td></tr> 1185226031Sstas <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> 1186226031Sstas <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> 1187226031Sstas </table> 1188226031Sstas</dl> 1189226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 1190226031Sstas 1191226031Sstas</div> 1192226031Sstas</div><p> 1193226031Sstas<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)" --> 1194226031Sstas<div class="memitem"> 1195226031Sstas<div class="memproto"> 1196226031Sstas <table class="memname"> 1197226031Sstas <tr> 1198226031Sstas <td class="memname">KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_verify_checksum_iov </td> 1199226031Sstas <td>(</td> 1200226031Sstas <td class="paramtype">krb5_context </td> 1201226031Sstas <td class="paramname"> <em>context</em>, </td> 1202226031Sstas </tr> 1203226031Sstas <tr> 1204226031Sstas <td class="paramkey"></td> 1205226031Sstas <td></td> 1206226031Sstas <td class="paramtype">krb5_crypto </td> 1207226031Sstas <td class="paramname"> <em>crypto</em>, </td> 1208226031Sstas </tr> 1209226031Sstas <tr> 1210226031Sstas <td class="paramkey"></td> 1211226031Sstas <td></td> 1212226031Sstas <td class="paramtype">unsigned </td> 1213226031Sstas <td class="paramname"> <em>usage</em>, </td> 1214226031Sstas </tr> 1215226031Sstas <tr> 1216226031Sstas <td class="paramkey"></td> 1217226031Sstas <td></td> 1218226031Sstas <td class="paramtype"><a class="el" href="structkrb5__crypto__iov.html">krb5_crypto_iov</a> * </td> 1219226031Sstas <td class="paramname"> <em>data</em>, </td> 1220226031Sstas </tr> 1221226031Sstas <tr> 1222226031Sstas <td class="paramkey"></td> 1223226031Sstas <td></td> 1224226031Sstas <td class="paramtype">unsigned int </td> 1225226031Sstas <td class="paramname"> <em>num_data</em>, </td> 1226226031Sstas </tr> 1227226031Sstas <tr> 1228226031Sstas <td class="paramkey"></td> 1229226031Sstas <td></td> 1230226031Sstas <td class="paramtype">krb5_cksumtype * </td> 1231226031Sstas <td class="paramname"> <em>type</em></td><td> </td> 1232226031Sstas </tr> 1233226031Sstas <tr> 1234226031Sstas <td></td> 1235226031Sstas <td>)</td> 1236226031Sstas <td></td><td></td><td></td> 1237226031Sstas </tr> 1238226031Sstas </table> 1239226031Sstas</div> 1240226031Sstas<div class="memdoc"> 1241226031Sstas 1242226031Sstas<p> 1243226031SstasVerify a Kerberos message checksum.<p> 1244226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 1245226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 1246226031Sstas <tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>Kerberos context </td></tr> 1247226031Sstas <tr><td valign="top"></td><td valign="top"><em>crypto</em> </td><td>Kerberos crypto context </td></tr> 1248226031Sstas <tr><td valign="top"></td><td valign="top"><em>usage</em> </td><td>Key usage for this buffer </td></tr> 1249226031Sstas <tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>array of buffers to process </td></tr> 1250226031Sstas <tr><td valign="top"></td><td valign="top"><em>num_data</em> </td><td>length of array </td></tr> 1251226031Sstas <tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>return checksum type if not NULL</td></tr> 1252226031Sstas </table> 1253226031Sstas</dl> 1254226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return an error code or 0. </dd></dl> 1255226031Sstas 1256226031Sstas</div> 1257226031Sstas</div><p> 1258226031Sstas</div> 1259226031Sstas<hr size="1"><address style="text-align: right;"><small> 1260234027SstasGenerated 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> 1261226031Sstas</body> 1262226031Sstas</html> 1263