| OLD | NEW |
| 1 /* crypto/evp/m_mdc2.c */ | 1 /* crypto/evp/m_mdc2.c */ |
| 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * This package is an SSL implementation written | 5 * This package is an SSL implementation written |
| 6 * by Eric Young (eay@cryptsoft.com). | 6 * by Eric Young (eay@cryptsoft.com). |
| 7 * The implementation was written so as to conform with Netscapes SSL. | 7 * The implementation was written so as to conform with Netscapes SSL. |
| 8 * | 8 * |
| 9 * This library is free for commercial and non-commercial use as long as | 9 * This library is free for commercial and non-commercial use as long as |
| 10 * the following conditions are aheared to. The following conditions | 10 * the following conditions are aheared to. The following conditions |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 * SUCH DAMAGE. | 51 * SUCH DAMAGE. |
| 52 * | 52 * |
| 53 * The licence and distribution terms for any publically available version or | 53 * The licence and distribution terms for any publically available version or |
| 54 * derivative of this code cannot be changed. i.e. this code cannot simply be | 54 * derivative of this code cannot be changed. i.e. this code cannot simply be |
| 55 * copied and put under another distribution licence | 55 * copied and put under another distribution licence |
| 56 * [including the GNU Public Licence.] | 56 * [including the GNU Public Licence.] |
| 57 */ | 57 */ |
| 58 | 58 |
| 59 #include <stdio.h> | 59 #include <stdio.h> |
| 60 #include "cryptlib.h" | 60 #include "cryptlib.h" |
| 61 #include "evp_locl.h" | |
| 62 | 61 |
| 63 #ifndef OPENSSL_NO_MDC2 | 62 #ifndef OPENSSL_NO_MDC2 |
| 64 | 63 |
| 65 #include <openssl/evp.h> | 64 #include <openssl/evp.h> |
| 66 #include <openssl/objects.h> | 65 #include <openssl/objects.h> |
| 67 #include <openssl/x509.h> | 66 #include <openssl/x509.h> |
| 68 #include <openssl/mdc2.h> | 67 #include <openssl/mdc2.h> |
| 68 #ifndef OPENSSL_NO_RSA |
| 69 #include <openssl/rsa.h> | 69 #include <openssl/rsa.h> |
| 70 #endif |
| 70 | 71 |
| 71 static int init(EVP_MD_CTX *ctx) | 72 static int init(EVP_MD_CTX *ctx) |
| 72 { return MDC2_Init(ctx->md_data); } | 73 { return MDC2_Init(ctx->md_data); } |
| 73 | 74 |
| 74 static int update(EVP_MD_CTX *ctx,const void *data,size_t count) | 75 static int update(EVP_MD_CTX *ctx,const void *data,size_t count) |
| 75 { return MDC2_Update(ctx->md_data,data,count); } | 76 { return MDC2_Update(ctx->md_data,data,count); } |
| 76 | 77 |
| 77 static int final(EVP_MD_CTX *ctx,unsigned char *md) | 78 static int final(EVP_MD_CTX *ctx,unsigned char *md) |
| 78 { return MDC2_Final(md,ctx->md_data); } | 79 { return MDC2_Final(md,ctx->md_data); } |
| 79 | 80 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 91 EVP_PKEY_RSA_ASN1_OCTET_STRING_method, | 92 EVP_PKEY_RSA_ASN1_OCTET_STRING_method, |
| 92 MDC2_BLOCK, | 93 MDC2_BLOCK, |
| 93 sizeof(EVP_MD *)+sizeof(MDC2_CTX), | 94 sizeof(EVP_MD *)+sizeof(MDC2_CTX), |
| 94 }; | 95 }; |
| 95 | 96 |
| 96 const EVP_MD *EVP_mdc2(void) | 97 const EVP_MD *EVP_mdc2(void) |
| 97 { | 98 { |
| 98 return(&mdc2_md); | 99 return(&mdc2_md); |
| 99 } | 100 } |
| 100 #endif | 101 #endif |
| OLD | NEW |