-: 0:Source:keylengths.c -: 0:Graph:/var/tsitkova/Sources/v10/trunk/src/lib/crypto/krb/keylengths.so.gcno -: 0:Data:/var/tsitkova/Sources/v10/trunk/src/lib/crypto/krb/keylengths.so.gcda -: 0:Runs:1630 -: 0:Programs:1 -: 1:/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ -: 2:/* -: 3: * COPYRIGHT (c) 2006 -: 4: * The Regents of the University of Michigan -: 5: * ALL RIGHTS RESERVED -: 6: * -: 7: * Permission is granted to use, copy, create derivative works -: 8: * and redistribute this software and such derivative works -: 9: * for any purpose, so long as the name of The University of -: 10: * Michigan is not used in any advertising or publicity -: 11: * pertaining to the use of distribution of this software -: 12: * without specific, written prior authorization. If the -: 13: * above copyright notice or any other identification of the -: 14: * University of Michigan is included in any copy of any -: 15: * portion of this software, then the disclaimer below must -: 16: * also be included. -: 17: * -: 18: * THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION -: 19: * FROM THE UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY -: 20: * PURPOSE, AND WITHOUT WARRANTY BY THE UNIVERSITY OF -: 21: * MICHIGAN OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING -: 22: * WITHOUT LIMITATION THE IMPLIED WARRANTIES OF -: 23: * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE -: 24: * REGENTS OF THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE -: 25: * FOR ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, INCIDENTAL, OR -: 26: * CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM ARISING -: 27: * OUT OF OR IN CONNECTION WITH THE USE OF THE SOFTWARE, EVEN -: 28: * IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY OF -: 29: * SUCH DAMAGES. -: 30: */ -: 31: -: 32:#include "crypto_int.h" -: 33: -: 34:/* -: 35: * keybytes is the number of bytes required as input to make a key, -: 36: * keylength is the length of the final key in bytes -: 37: */ -: 38:krb5_error_code KRB5_CALLCONV 7: 39:krb5_c_keylengths(krb5_context context, krb5_enctype enctype, -: 40: size_t *keybytes, size_t *keylength) -: 41:{ -: 42: const struct krb5_keytypes *ktp; -: 43: 7: 44: if (keybytes == NULL && keylength == NULL) #####: 45: return EINVAL; -: 46: 7: 47: ktp = find_enctype(enctype); 7: 48: if (ktp == NULL) #####: 49: return KRB5_BAD_ENCTYPE; -: 50: 7: 51: if (keybytes) 7: 52: *keybytes = ktp->enc->keybytes; 7: 53: if (keylength) 7: 54: *keylength = ktp->enc->keylength; -: 55: 7: 56: return 0; -: 57:}