diff --git a/source/ubl-settings-update.c b/source/ubl-settings-update.c
index a42f6ed..2b9342a 100644
--- a/source/ubl-settings-update.c
+++ b/source/ubl-settings-update.c
@@ -1333,8 +1333,11 @@ void on_password_accept(GtkWidget *,dictionary *dict){
return;
}
char *encryption = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->EncryptionCombo));
- char *final_text = yon_char_unite(encryption,"|",password,NULL);
- gtk_entry_set_text(GTK_ENTRY(target),final_text);
+
+ int size;
+ config_str hash = yon_config_load(!strcmp(encryption,"sha512")?sha512_encrypt_command(password):sha256_encrypt_command(password),&size);
+ yon_char_remove_last_symbol(hash[0],'\n');
+ gtk_entry_set_text(GTK_ENTRY(target),hash[0]);
}
gtk_widget_destroy(window->Window);
diff --git a/source/ubl-settings-update.h b/source/ubl-settings-update.h
index 9082b1d..6a5cf4d 100644
--- a/source/ubl-settings-update.h
+++ b/source/ubl-settings-update.h
@@ -41,6 +41,9 @@
#define LocaleName "ubl-settings-update"
#define icon_path "com.ublinux.ubl-settings-update"
+#define sha256_encrypt_command(taget) yon_char_unite("echo -n \"",target,"\" | sha256sum | cut -f 1 -d ' '",NULL)
+#define sha512_encrypt_command(taget) yon_char_unite("echo -n \"",target,"\" | sha512sum | cut -f 1 -d ' '",NULL)
+
#define yon_config_get_custom_command(target) yon_char_unite("ubconfig --source ",target," get update REPOPUBLIC_NET REPOPUBLIC_WEB REPOSITORY[*] REPOPUBLIC_WEB REPOPUBLIC_WEB[*] REPOPUBLIC_CACHE REPOPUBLIC_CACHE[*] AUTOUPDATE AUTOUPDATE[mode] AUTOUPDATE[interval] AUTOUPDATE[repos] AUTOUPDATE[timestamp]",NULL)
#define config_get_local_command "ubconfig --source system get update REPOPUBLIC_NET REPOPUBLIC_WEB REPOSITORY[*] REPOPUBLIC_WEB REPOPUBLIC_WEB[*] REPOPUBLIC_CACHE REPOPUBLIC_CACHE[*] AUTOUPDATE AUTOUPDATE[mode] AUTOUPDATE[interval] AUTOUPDATE[repos] AUTOUPDATE[timestamp]"
#define config_get_global_command "ubconfig --source global get update REPOPUBLIC_NET REPOPUBLIC_WEB REPOSITORY[*] REPOPUBLIC_WEB REPOPUBLIC_WEB[*] REPOPUBLIC_CACHE REPOPUBLIC_CACHE[*] AUTOUPDATE AUTOUPDATE[mode] AUTOUPDATE[interval] AUTOUPDATE[repos] AUTOUPDATE[timestamp]"
diff --git a/source/ubl-strings.h b/source/ubl-strings.h
index 6a198c3..e96bffa 100644
--- a/source/ubl-strings.h
+++ b/source/ubl-strings.h
@@ -48,6 +48,7 @@ mirrorlist - mirrors file, make sure server URL is NOT included in this file! Si
#define _LABEL _("Storage path to publish")
#define _LABEL _("The full URL of where to find the database, packages, and signatures (if available) for this repository. Multiple can be specified, separated by commas (,)")
#define _LABEL _("Update")
+ #define _LABEL _("System update")
#define _LABEL _("Repositories")
#define _LABEL _("Publication")
#define _LABEL _("WEB-publication")
diff --git a/ubl-settings-update-repo-add.glade b/ubl-settings-update-repo-add.glade
index 2fe5c9e..088f105 100644
--- a/ubl-settings-update-repo-add.glade
+++ b/ubl-settings-update-repo-add.glade
@@ -901,6 +901,7 @@ Configuration - configuration path
True
True
False
+ True
True