|
|
|
|
@ -1391,13 +1391,16 @@ void on_password_accept(GtkWidget *,dictionary *dict){
|
|
|
|
|
GtkWidget *target = yon_dictionary_get_data(dict->first->next,GtkWidget*);
|
|
|
|
|
|
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->NoEncriptionCheck))){
|
|
|
|
|
char *encryption = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->EncryptionCombo));
|
|
|
|
|
char *hash = (char*)gtk_entry_get_text(GTK_ENTRY(window->PasswordHashEntry));
|
|
|
|
|
if (yon_char_is_empty(hash)){
|
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
yon_ubl_status_highlight_incorrect(window->PasswordHashEntry);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(target),hash);
|
|
|
|
|
char *temp = yon_char_unite(encryption,"|",hash,NULL);
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(target),temp);
|
|
|
|
|
free(temp);
|
|
|
|
|
} else {
|
|
|
|
|
char *password = (char*)gtk_entry_get_text(GTK_ENTRY(window->PasswordEntry));
|
|
|
|
|
char *password_check = (char*)gtk_entry_get_text(GTK_ENTRY(window->RepeatPasswordEntry));
|
|
|
|
|
@ -1416,6 +1419,11 @@ void on_password_accept(GtkWidget *,dictionary *dict){
|
|
|
|
|
if (yon_char_is_empty(encryption)){
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(target),password);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->NoEncriptionCheck))){
|
|
|
|
|
char *temp = yon_char_unite(encryption,"|",password,NULL);
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(target),temp);
|
|
|
|
|
free(temp);
|
|
|
|
|
} else {
|
|
|
|
|
int size;
|
|
|
|
|
config_str hash = yon_config_load(yon_debug_output("%s\n",!strcmp(encryption,"sha512")?sha512_encrypt_command(password):sha256_encrypt_command(password)),&size);
|
|
|
|
|
@ -1423,6 +1431,8 @@ void on_password_accept(GtkWidget *,dictionary *dict){
|
|
|
|
|
char *temp = yon_char_unite(encryption,"|",hash[0],NULL);
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(target),temp);
|
|
|
|
|
yon_char_parsed_free(hash,size);
|
|
|
|
|
free(temp);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|