if (!info->hash) return SECFailure; if (info->multihash) return sha1_multi_test(info);
sha1_test(blapitestInfo *info){	unsigned int len;	SHA1Context *cx = SHA1_NewContext();	SECStatus rv = SECSuccess;	PRIntervalTime time1, time2;	PRInt32 tdiff;	int i;	if (info->in.len == 0) {		rv = get_and_write_random_bytes(&info->in, info->bufsize, "tmp.pt");		CHECKERROR(rv, __LINE__);	}	info->out.len = SHA1_LENGTH;	info->out.data = (unsigned char *)PORT_ZAlloc(info->out.len);	info->in.data[info->in.len] = '\0';	TIMESTART();	for (i=info->repetitions; i>0; i--) {		SHA1_Begin(cx);		SHA1_Update(cx, info->in.data, info->in.len);		SHA1_End(cx, info->out.data, &len, SHA1_LENGTH);	}	TIMEFINISH("SHA1 HASH", info->in.len);	SHA1_DestroyContext(cx, PR_TRUE);	return rv;}