#ifndef SHARED_AUTHENTICATE_H
#define SHARED_AUTHENTICATE_H

/* how many times can we try to derive a unique username? */
#define MAX_USERNAME_TRIES 10  
#include "../global.h"
void get_first_last_names(char *realname, char *first, char *last);
void derive_username (const char *first, const char *last, const char *id, char *username, int max_username);
void derive_another_username(const char *first, const char *last, const char *id,  char *username, 
							int string_len,  int try);
void derive_password (const char *username, const char *first_name, const char *last_name, 
							const char *id, char *password, int maxlen);

int username_invalid(char *username);

char sub_dir_name( const char *username);
int username_cmp (USER_DATA *a_data, USER_DATA *b_data);
void delete_central_user_keys(const char *username);
void delete_course_central_user_key(const char *username, const char *course);
char *get_lastname(const char *real_name);
   

#endif


