diff options
-rw-r--r-- | crypt.h | 8 | ||||
-rw-r--r-- | shopify.c | 2 |
2 files changed, 5 insertions, 5 deletions
@@ -24,12 +24,12 @@ static inline bool crypt_maccmp(const char *key, const char *query, return !strcmp(hmac, hmacsha256_str); } -static inline void crypt_getnonce(char *string, const size_t string_len) +static inline void crypt_getnonce(char buf[], const size_t buf_len) { - string[0] = '\0'; - const size_t nonce_len = string_len / 2; + buf[0] = '\0'; + const size_t nonce_len = buf_len / 2; unsigned char nonce[nonce_len + 1]; gcry_create_nonce(nonce, nonce_len); for (int i = 0; i < nonce_len; i++) - sprintf(string, "%s%02x", string, nonce[i]); + sprintf(buf, "%s%02x", buf, nonce[i]); } @@ -43,7 +43,7 @@ extern inline void crypt_init(); extern inline bool crypt_maccmp(const char *, const char *, const char *); -extern inline void crypt_getnonce(char *, const size_t); +extern inline void crypt_getnonce(char [], const size_t); extern inline bool regex_match(const char *); extern inline void base64_decode(unsigned char *, char **); extern inline void config_getscopes(const char *, char **); |