The OpenBSD project has replaced the first implementation of the /dev/crypto
[oweals/openssl.git] / crypto / evp / m_md2.c
index 442d234e320ed61e8983f2ba21987d082da4fc1d..50914c83b3afaadaef388b5a4f7bbf18fd04e441 100644 (file)
 #include <openssl/x509.h>
 #include <openssl/md2.h>
 
+static int init(EVP_MD_CTX *ctx)
+       { return MD2_Init(ctx->md_data); }
+
+static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count)
+       { return MD2_Update(ctx->md_data,data,count); }
+
+static int final(EVP_MD_CTX *ctx,unsigned char *md)
+       { return MD2_Final(md,ctx->md_data); }
+
 static const EVP_MD md2_md=
        {
        NID_md2,
        NID_md2WithRSAEncryption,
        MD2_DIGEST_LENGTH,
-       MD2_Init,
-       MD2_Update,
-       MD2_Final,
+       0,
+       init,
+       update,
+       final,
+       NULL,
+       NULL,
        EVP_PKEY_RSA_method,
        MD2_BLOCK,
        sizeof(EVP_MD *)+sizeof(MD2_CTX),