EVP_MD_CTX_cleanup(&ctx);
static int test_digest(const char *digest,		       const unsigned char *plaintext,int pn,		       const unsigned char *ciphertext, int cn)    {    const EVP_MD *d;    EVP_MD_CTX ctx;    unsigned char md[EVP_MAX_MD_SIZE];    unsigned int mdn;    d=EVP_get_digestbyname(digest);    if(!d)	return 0;    printf("Testing digest %s\n",EVP_MD_name(d));    hexdump(stdout,"Plaintext",plaintext,pn);    hexdump(stdout,"Digest",ciphertext,cn);    EVP_MD_CTX_init(&ctx);    if(!EVP_DigestInit(&ctx,d))	{	fprintf(stderr,"DigestInit failed\n");	exit(100);	}    if(!EVP_DigestUpdate(&ctx,plaintext,pn))	{	fprintf(stderr,"DigestUpdate failed\n");	exit(101);	}    if(!EVP_DigestFinal(&ctx,md,&mdn))	{	fprintf(stderr,"DigestUpdate failed\n");	exit(101);	}    if(mdn != cn)	{	fprintf(stderr,"Digest length mismatch, got %d expected %d\n",mdn,cn);	exit(102);	}    if(memcmp(md,ciphertext,cn))	{	fprintf(stderr,"Digest mismatch\n");	hexdump(stderr,"Got",md,cn);	hexdump(stderr,"Expected",ciphertext,cn);	exit(103);	}    printf("\n");    return 1;    }