110db137gtb/*
210db137gtb * CDDL HEADER START
310db137gtb *
410db137gtb * The contents of this file are subject to the terms of the
510db137gtb * Common Development and Distribution License (the "License").
610db137gtb * You may not use this file except in compliance with the License.
710db137gtb *
810db137gtb * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
910db137gtb * or http://www.opensolaris.org/os/licensing.
1010db137gtb * See the License for the specific language governing permissions
1110db137gtb * and limitations under the License.
1210db137gtb *
1310db137gtb * When distributing Covered Code, include this CDDL HEADER in each
1410db137gtb * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1510db137gtb * If applicable, add the following below this CDDL HEADER, with the
1610db137gtb * fields enclosed by brackets "[]" replaced with your own identifying
1710db137gtb * information: Portions Copyright [yyyy] [name of copyright owner]
1810db137gtb *
1910db137gtb * CDDL HEADER END
2010db137gtb */
2110db137gtb
2210db137gtb/*
2310db137gtb * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2410db137gtb * Use is subject to license terms.
2510db137gtb */
2610db137gtb
2710db137gtb#pragma ident	"%Z%%M%	%I%	%E% SMI"
2810db137gtb
2910db137gtb#include "k5-int.h"
3010db137gtb
3110db137gtb
3210db137gtbkrb5_enctype
3310db137gtbkrb5_get_key_enctype(krb5_keyblock *kb)
3410db137gtb{
3510db137gtb	return (kb->enctype);
3610db137gtb}
3710db137gtb
3810db137gtbunsigned int
3910db137gtbkrb5_get_key_length(krb5_keyblock *kb)
4010db137gtb{
4110db137gtb	return (kb->length);
4210db137gtb}
4310db137gtb
4410db137gtbkrb5_octet *
4510db137gtbkrb5_get_key_data(krb5_keyblock *kb)
4610db137gtb{
4710db137gtb	return (kb->contents);
4810db137gtb}
4910db137gtb
5010db137gtbvoid
5110db137gtbkrb5_set_key_enctype(krb5_keyblock *kb, krb5_enctype enctype)
5210db137gtb{
5310db137gtb	kb->enctype = enctype;
5410db137gtb}
5510db137gtb
5610db137gtbvoid
5710db137gtbkrb5_set_key_length(krb5_keyblock *kb, unsigned int len)
5810db137gtb{
5910db137gtb	kb->length = len;
6010db137gtb}
6110db137gtb
6210db137gtbvoid
6310db137gtbkrb5_set_key_data(krb5_keyblock *kb, krb5_octet *data)
6410db137gtb{
6510db137gtb	kb->contents = data;
6610db137gtb}
67