<commit_before>#include <stdio.h>
#include <unistd.h>
#include <string.h>

int main(int argc, char **argv) {

	char password_first[1024], password_repeat[1024];
	char *input, *passwordfile, *username, *realm, *encrypted;
	FILE *htpasswd_file;

	if(argc < 4) {

		printf("Usage:\n\n");
		printf("htdigest passwordfile realm username\n");
		printf("htdigest passwordfile realm username password\n\n");
		printf("Creates or updates an Apache/nginx compatible htdigest file\n");

		return 1;

	}
	
	passwordfile = argv[1];
	username = argv[2];
	realm = argv[3];

	if(argc != 5) {
		
		input = getpass("Password: ");
		strcpy(password_first, input);

		input = getpass("Password (again): ");
		strcpy(password_repeat, input);

		memset(input, 0, strlen(input));

		int password_compare = strcmp(password_first, password_repeat);
<commit_msg>Fixed bug where username and realm were recorded incorrectly<commit_after>#include <stdio.h>
#include <unistd.h>
#include <string.h>

int main(int argc, char **argv) {

	char password_first[1024], password_repeat[1024];
	char *input, *passwordfile, *username, *realm, *encrypted;
	FILE *htpasswd_file;

	if(argc < 4) {

		printf("Usage:\n\n");
		printf("htdigest passwordfile realm username\n");
		printf("htdigest passwordfile realm username password\n\n");
		printf("Creates or updates an Apache/nginx compatible htdigest file\n");

		return 1;

	}
	
	passwordfile = argv[1];
	realm = argv[2];
	username = argv[3];

	if(argc != 5) {
		
		input = getpass("Password: ");
		strcpy(password_first, input);

		input = getpass("Password (again): ");
		strcpy(password_repeat, input);

		memset(input, 0, strlen(input));

		int password_compare = strcmp(password_first, password_repeat);

{'fraction_non_alphanumeric': 0.14659685863874344, 'fraction_numerical': 0.017452006980802792, 'mean_word_length': 5.035087719298246, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1584212', 'n_tokens_mistral': 646, 'n_tokens_neox': 574, 'n_words': 144}