1*10db1377Sgtb /*
2*10db1377Sgtb * CDDL HEADER START
3*10db1377Sgtb *
4*10db1377Sgtb * The contents of this file are subject to the terms of the
5*10db1377Sgtb * Common Development and Distribution License (the "License").
6*10db1377Sgtb * You may not use this file except in compliance with the License.
7*10db1377Sgtb *
8*10db1377Sgtb * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*10db1377Sgtb * or http://www.opensolaris.org/os/licensing.
10*10db1377Sgtb * See the License for the specific language governing permissions
11*10db1377Sgtb * and limitations under the License.
12*10db1377Sgtb *
13*10db1377Sgtb * When distributing Covered Code, include this CDDL HEADER in each
14*10db1377Sgtb * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*10db1377Sgtb * If applicable, add the following below this CDDL HEADER, with the
16*10db1377Sgtb * fields enclosed by brackets "[]" replaced with your own identifying
17*10db1377Sgtb * information: Portions Copyright [yyyy] [name of copyright owner]
18*10db1377Sgtb *
19*10db1377Sgtb * CDDL HEADER END
20*10db1377Sgtb */
21*10db1377Sgtb
22*10db1377Sgtb /*
23*10db1377Sgtb * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24*10db1377Sgtb * Use is subject to license terms.
25*10db1377Sgtb */
26*10db1377Sgtb
27*10db1377Sgtb #include "k5-int.h"
28*10db1377Sgtb
29*10db1377Sgtb
30*10db1377Sgtb krb5_enctype
krb5_get_key_enctype(krb5_keyblock * kb)31*10db1377Sgtb krb5_get_key_enctype(krb5_keyblock *kb)
32*10db1377Sgtb {
33*10db1377Sgtb return (kb->enctype);
34*10db1377Sgtb }
35*10db1377Sgtb
36*10db1377Sgtb unsigned int
krb5_get_key_length(krb5_keyblock * kb)37*10db1377Sgtb krb5_get_key_length(krb5_keyblock *kb)
38*10db1377Sgtb {
39*10db1377Sgtb return (kb->length);
40*10db1377Sgtb }
41*10db1377Sgtb
42*10db1377Sgtb krb5_octet *
krb5_get_key_data(krb5_keyblock * kb)43*10db1377Sgtb krb5_get_key_data(krb5_keyblock *kb)
44*10db1377Sgtb {
45*10db1377Sgtb return (kb->contents);
46*10db1377Sgtb }
47*10db1377Sgtb
48*10db1377Sgtb void
krb5_set_key_enctype(krb5_keyblock * kb,krb5_enctype enctype)49*10db1377Sgtb krb5_set_key_enctype(krb5_keyblock *kb, krb5_enctype enctype)
50*10db1377Sgtb {
51*10db1377Sgtb kb->enctype = enctype;
52*10db1377Sgtb }
53*10db1377Sgtb
54*10db1377Sgtb void
krb5_set_key_length(krb5_keyblock * kb,unsigned int len)55*10db1377Sgtb krb5_set_key_length(krb5_keyblock *kb, unsigned int len)
56*10db1377Sgtb {
57*10db1377Sgtb kb->length = len;
58*10db1377Sgtb }
59*10db1377Sgtb
60*10db1377Sgtb void
krb5_set_key_data(krb5_keyblock * kb,krb5_octet * data)61*10db1377Sgtb krb5_set_key_data(krb5_keyblock *kb, krb5_octet *data)
62*10db1377Sgtb {
63*10db1377Sgtb kb->contents = data;
64*10db1377Sgtb }
65