xref: /illumos-gate/usr/src/uts/common/gssapi/mechs/krb5/include/arcfour.h (revision cbea7aca3fd7787405cbdbd93752998f03dfc25f)
1 /*
2  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 #ifndef ARCFOUR_H
7 #define ARCFOUR_H
8 
9 #define CONFOUNDERLENGTH 8
10 
11 extern void
12 krb5_arcfour_encrypt_length(const struct krb5_enc_provider *,
13 			const struct krb5_hash_provider *,
14 			size_t,
15 			size_t *);
16 
17 extern
18 krb5_error_code krb5_arcfour_encrypt(krb5_context,
19 			const struct krb5_enc_provider *,
20 			const struct krb5_hash_provider *,
21 			const krb5_keyblock *,
22 			krb5_keyusage,
23 			const krb5_data *,
24      			const krb5_data *,
25 			krb5_data *);
26 
27 extern
28 krb5_error_code krb5_arcfour_decrypt(krb5_context,
29 			const struct krb5_enc_provider *,
30 			const struct krb5_hash_provider *,
31 			const krb5_keyblock *,
32 			krb5_keyusage,
33 			const krb5_data *,
34 			const krb5_data *,
35 			krb5_data *);
36 
37 #ifndef _KERNEL
38 extern krb5_error_code krb5int_arcfour_string_to_key(
39 	krb5_context,
40      const struct krb5_enc_provider *,
41      const krb5_data *,
42      const krb5_data *,
43      const krb5_data *,
44      krb5_keyblock *);
45 #endif /* _KERNEL */
46 
47 extern const struct krb5_enc_provider krb5int_enc_arcfour;
48 
49 krb5_keyusage krb5int_arcfour_translate_usage(krb5_keyusage usage);
50 
51 #endif /* ARCFOUR_H */
52