libssh  0.5.2
include/libssh/wrapper.h
00001 /*
00002  * This file is part of the SSH Library
00003  *
00004  * Copyright (c) 2009 by Aris Adamantiadis
00005  *
00006  * The SSH Library is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU Lesser General Public License as published by
00008  * the Free Software Foundation; either version 2.1 of the License, or (at your
00009  * option) any later version.
00010  *
00011  * The SSH Library is distributed in the hope that it will be useful, but
00012  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00013  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
00014  * License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public License
00017  * along with the SSH Library; see the file COPYING.  If not, write to
00018  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
00019  * MA 02111-1307, USA.
00020  */
00021 
00022 #ifndef WRAPPER_H_
00023 #define WRAPPER_H_
00024 
00025 #include "config.h"
00026 #include "libssh/libcrypto.h"
00027 #include "libssh/libgcrypt.h"
00028 
00029 MD5CTX md5_init(void);
00030 void md5_update(MD5CTX c, const void *data, unsigned long len);
00031 void md5_final(unsigned char *md,MD5CTX c);
00032 SHACTX sha1_init(void);
00033 void sha1_update(SHACTX c, const void *data, unsigned long len);
00034 void sha1_final(unsigned char *md,SHACTX c);
00035 void sha1(unsigned char *digest,int len,unsigned char *hash);
00036 #define HMAC_SHA1 1
00037 #define HMAC_MD5 2
00038 HMACCTX hmac_init(const void *key,int len,int type);
00039 void hmac_update(HMACCTX c, const void *data, unsigned long len);
00040 void hmac_final(HMACCTX ctx,unsigned char *hashmacbuf,unsigned int *len);
00041 
00042 int crypt_set_algorithms(ssh_session );
00043 int crypt_set_algorithms_server(ssh_session session);
00044 struct ssh_crypto_struct *crypto_new(void);
00045 void crypto_free(struct ssh_crypto_struct *crypto);
00046 
00047 
00048 #endif /* WRAPPER_H_ */