3 * Copyright (C) 2011 Sawtooth Consulting Ltd.
5 * This file is part of CyaSSL.
7 * CyaSSL is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * CyaSSL is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
23 /* evp.h defines mini evp openssl compatibility layer
33 #include "prefix_evp.h"
45 typedef char EVP_CIPHER
;
47 const EVP_MD
* EVP_md5(void);
48 const EVP_MD
* EVP_sha1(void);
57 typedef struct EVP_MD_CTX
{
58 unsigned char macType
; /* md5 or sha for now */
63 void EVP_MD_CTX_init(EVP_MD_CTX
* ctx
);
64 int EVP_MD_CTX_cleanup(EVP_MD_CTX
* ctx
);
66 int EVP_DigestInit(EVP_MD_CTX
* ctx
, const EVP_MD
* type
);
67 int EVP_DigestUpdate(EVP_MD_CTX
* ctx
, const void* data
, size_t sz
);
68 int EVP_DigestFinal(EVP_MD_CTX
* ctx
, unsigned char* md
, unsigned int* s
);
69 int EVP_DigestFinal_ex(EVP_MD_CTX
* ctx
, unsigned char* md
, unsigned int* s
);
71 int EVP_BytesToKey(const EVP_CIPHER
*, const EVP_MD
*, const unsigned char*,
72 const unsigned char*, int, int, unsigned char*, unsigned char*);
79 #endif /* CYASSL_EVP_H_ */