]> arthur.barton.de Git - netatalk.git/blob - etc/uams/crypt.h
Put cryptographic code into a separate code file. This is in preparation
[netatalk.git] / etc / uams / crypt.h
1 #ifndef __UAMS_CRYPT_H
2 #define __UAMS_CRYPT_H
3
4 /*
5  * $Id: crypt.h,v 1.1 2003-06-11 06:29:30 srittau Exp $
6  *
7  * Copyright (c) 1990,1993 Regents of The University of Michigan.
8  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
9  * All Rights Reserved.  See COPYRIGHT.
10  */
11
12 #include <sys/types.h>
13
14 typedef void *CryptHandle;
15
16 void hexify(u_int8_t *dst, size_t dstlen, const u_int8_t *src, size_t srclen);
17 void unhexify(u_int8_t *dst, size_t dstlen, const u_int8_t *src, size_t srclen);
18
19 int encrypt_start(CryptHandle *handle, u_int8_t *key);
20 int encrypt_do(CryptHandle handle, u_int8_t *dst, u_int8_t *src);
21 void encrypt_end(CryptHandle handle);
22
23 int encrypt(u_int8_t *key, u_int8_t *dst, u_int8_t *src);
24 int decrypt(u_int8_t *key, u_int8_t *dst, u_int8_t *src);
25
26 #endif /* __UAMS_CRYPT_H */