Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / rxkad / rxkad_convert.h
1
2 /* Conversion functions to go between the various different key types used
3 * by rxkad and supporting libraries
4 */
5
6 #ifndef OPENAFS_RXKAD_CONVERT_H
7 #define OPENAFS_RXKAD_CONVERT_H 1
8
9 #include <hcrypto/des.h>
10
11 struct ktc_encryptionKey;
12
13 static_inline DES_cblock *
14 ktc_to_cblock(struct ktc_encryptionKey *key) {
15 return (DES_cblock *)key;
16 }
17
18 static_inline char *
19 ktc_to_charptr(struct ktc_encryptionKey *key) {
20 return (char *)key;
21 }
22
23
24 static_inline DES_cblock *
25 ktc_to_cblockptr(struct ktc_encryptionKey *key) {
26 return (DES_cblock *)key;
27 }
28
29 #if 0
30 static_inline unsigned char *
31 cblockptr_to_cblock(DES_cblock *key) {
32 return (unsigned char *)key;
33 }
34 #endif
35
36 static_inline DES_cblock *
37 charptr_to_cblock(char *key) {
38 return (DES_cblock *)key;
39 }
40
41 static_inline DES_cblock *
42 charptr_to_cblockptr(char *key) {
43 return (DES_cblock *)key;
44 }
45
46 #endif