libssh  0.5.4
wrapper.h
1 /*
2  * This file is part of the SSH Library
3  *
4  * Copyright (c) 2009 by Aris Adamantiadis
5  *
6  * The SSH Library is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation; either version 2.1 of the License, or (at your
9  * option) any later version.
10  *
11  * The SSH Library is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14  * License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with the SSH Library; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
19  * MA 02111-1307, USA.
20  */
21 
22 #ifndef WRAPPER_H_
23 #define WRAPPER_H_
24 
25 #include "config.h"
26 #include "libssh/libcrypto.h"
27 #include "libssh/libgcrypt.h"
28 
29 MD5CTX md5_init(void);
30 void md5_update(MD5CTX c, const void *data, unsigned long len);
31 void md5_final(unsigned char *md,MD5CTX c);
32 SHACTX sha1_init(void);
33 void sha1_update(SHACTX c, const void *data, unsigned long len);
34 void sha1_final(unsigned char *md,SHACTX c);
35 void sha1(unsigned char *digest,int len,unsigned char *hash);
36 #define HMAC_SHA1 1
37 #define HMAC_MD5 2
38 HMACCTX hmac_init(const void *key,int len,int type);
39 void hmac_update(HMACCTX c, const void *data, unsigned long len);
40 void hmac_final(HMACCTX ctx,unsigned char *hashmacbuf,unsigned int *len);
41 
42 int crypt_set_algorithms(ssh_session );
43 int crypt_set_algorithms_server(ssh_session session);
44 struct ssh_crypto_struct *crypto_new(void);
45 void crypto_free(struct ssh_crypto_struct *crypto);
46 
47 
48 #endif /* WRAPPER_H_ */