From a5a8c2b17c39fc62b83f582da699943e9ec92ca3 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Mon, 12 Oct 2009 10:32:39 +0200 Subject: [PATCH] Switch to ysc_b64_encode, get rid of glib dependency --- src/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index 765be2a..3cd883b 100644 --- a/src/main.c +++ b/src/main.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include "util.h" #include @@ -79,10 +78,10 @@ char *get_timestamp(void) { return ts; } -gchar *sign_request(char *key, size_t key_len, char *info, char *status, +char *sign_request(char *key, size_t key_len, char *info, char *status, char *timestamp) { char *line; - gchar *ret; + char *ret; gcry_md_hd_t hd; if (info != NULL) { asprintf(&line, "info=%s&status=%s×tamp=%s", info, @@ -94,7 +93,8 @@ gchar *sign_request(char *key, size_t key_len, char *info, char *status, gcry_md_setkey(hd, key, key_len); gcry_md_write(hd, line, strlen(line)); gcry_md_final(hd); - ret = g_base64_encode(gcry_md_read(hd, 0), gcry_md_get_algo_dlen(GCRY_MD_SHA1)); + ret = ysc_b64_encode((char *) gcry_md_read(hd, 0), + gcry_md_get_algo_dlen(GCRY_MD_SHA1)); gcry_md_close(hd); free(line); return ret; -- 2.39.5