u_int8_t key_len, salt_len, logr;
u_int8_t key_len, salt_len, logr, minor;
bcrypt(key, salt)	const char   *key;	const char   *salt;{	blf_ctx state;	u_int32_t rounds, i, k;	u_int16_t j;	u_int8_t key_len, salt_len, logr;	u_int8_t ciphertext[4 * BCRYPT_BLOCKS] = "OrpheanBeholderScryDoubt";	u_int8_t csalt[BCRYPT_MAXSALT];	u_int32_t cdata[BCRYPT_BLOCKS];	/* Discard "$" identifier */	salt++;	if (*salt > BCRYPT_VERSION) {		/* How do I handle errors ? Return ':' */		return error;	}	/* Discard version + "$" identifier */	salt += 2;	if (*(salt + 2) != '$')		/* Out of sync with passwd entry */		return error;	/* Computer power doesnt increase linear, 2^x should be fine */	if ((rounds = (u_int32_t) 1 << (logr = atoi(salt))) < BCRYPT_MINROUNDS)		return error;	/* Discard num rounds + "$" identifier */	salt += 3;	/* We dont want the base64 salt but the raw data */	decode_base64(csalt, BCRYPT_MAXSALT, (u_int8_t *) salt);	salt_len = BCRYPT_MAXSALT;	key_len = strlen(key);	/* Setting up S-Boxes and Subkeys */	Blowfish_initstate(&state);	Blowfish_expandstate(&state, csalt, salt_len,	    (u_int8_t *) key, key_len);	for (k = 0; k < rounds; k++) {		Blowfish_expand0state(&state, (u_int8_t *) key, key_len);		Blowfish_expand0state(&state, csalt, salt_len);	}	/* This can be precomputed later */	j = 0;	for (i = 0; i < BCRYPT_BLOCKS; i++)		cdata[i] = Blowfish_stream2word(ciphertext, 4 * BCRYPT_BLOCKS, &j);	/* Now do the encryption */	for (k = 0; k < 64; k++)		blf_enc(&state, cdata, BCRYPT_BLOCKS / 2);	for (i = 0; i < BCRYPT_BLOCKS; i++) {		ciphertext[4 * i + 3] = cdata[i] & 0xff;		cdata[i] = cdata[i] >> 8;		ciphertext[4 * i + 2] = cdata[i] & 0xff;		cdata[i] = cdata[i] >> 8;		ciphertext[4 * i + 1] = cdata[i] & 0xff;		cdata[i] = cdata[i] >> 8;		ciphertext[4 * i + 0] = cdata[i] & 0xff;	}	encrypted[0] = '$';	encrypted[1] = BCRYPT_VERSION;	encrypted[2] = '$';	snprintf(encrypted + 3, 4, "%2.2u$", logr);	encode_base64((u_int8_t *) encrypted + 6, csalt, BCRYPT_MAXSALT);	encode_base64((u_int8_t *) encrypted + strlen(encrypted), ciphertext,	    4 * BCRYPT_BLOCKS);	return encrypted;}