| Top |
Following code snippets shows how a string can be encrypted with any of the supported encryption algorithm. Moreover, plain and encrypted secrets can be compared if needed.
gchar *pass = gum_crypt_encrypt_secret("pas.-s123", "SHA512");
g_free (pass);
pass = gum_crypt_encrypt_secret("pass ?()123", "SHA512");
gum_crypt_cmp_secret("pass ?()123", pass); //should return true.
g_free (pass);
gchar * gum_crypt_encrypt_secret (const gchar *secret,const gchar *encryp_algo);
Encrypts the secret with the specified algorithm encryp_algo
.