diff options
Diffstat (limited to 'libwardrobe')
-rw-r--r-- | libwardrobe/src/main.c | 4 | ||||
-rw-r--r-- | libwardrobe/src/md5.c | 12 | ||||
-rw-r--r-- | libwardrobe/src/md5.h | 3 |
3 files changed, 10 insertions, 9 deletions
diff --git a/libwardrobe/src/main.c b/libwardrobe/src/main.c index 1be8e92..a734c26 100644 --- a/libwardrobe/src/main.c +++ b/libwardrobe/src/main.c @@ -87,7 +87,7 @@ void WardrobeDestroy (WardrobeHandle_t *wh) { * @param wardrobe handle * @return _OK or error */ -WardrobeReturn_t WardrobeHandshake (WardrobeHandle_t *wh) { +static WardrobeReturn_t WardrobeHandshake (WardrobeHandle_t *wh) { /* md5 hash length + long integer max + NULL */ char url[WARDROBE_URL_SIZE], tmp[32+55+1], *tmpDigest, *pwDigest, ret[WARDROBE_HTTP_RECV_SIZE], postUrl[1024]; @@ -154,7 +154,7 @@ WardrobeReturn_t WardrobeHandshake (WardrobeHandle_t *wh) { * @param song * @return _OK or error */ -WardrobeReturn_t WardrobeSendSong (WardrobeHandle_t *wh, +static WardrobeReturn_t WardrobeSendSong (WardrobeHandle_t *wh, const WardrobeSong_t *ws) { char postContent[WARDROBE_HTTP_SEND_SIZE]; char *urlencArtist, *urlencTitle, *urlencAlbum, ret[WARDROBE_HTTP_RECV_SIZE]; diff --git a/libwardrobe/src/md5.c b/libwardrobe/src/md5.c index d41b5c9..4b8d038 100644 --- a/libwardrobe/src/md5.c +++ b/libwardrobe/src/md5.c @@ -51,9 +51,9 @@ typedef struct { unsigned char buffer[64]; /* input buffer */ } MD5_CTX; -void MD5Init (MD5_CTX *); -void MD5Update (MD5_CTX *, unsigned char *, unsigned int); -void MD5Final (unsigned char [16], MD5_CTX *); +static void MD5Init (MD5_CTX *); +static void MD5Update (MD5_CTX *, unsigned char *, unsigned int); +static void MD5Final (unsigned char [16], MD5_CTX *); static void MD5Transform (unsigned long int [4], unsigned char [64]); static void Encode (unsigned char *, unsigned long int *, unsigned int); @@ -101,7 +101,7 @@ Rotation is separate from addition to prevent recomputation. /* MD5 initialization. Begins an MD5 operation, writing a new context. * @param context */ -void MD5Init (MD5_CTX *context) { +static void MD5Init (MD5_CTX *context) { context->count[0] = context->count[1] = 0; /* Load magic initialization constants. */ context->state[0] = 0x67452301; @@ -117,7 +117,7 @@ void MD5Init (MD5_CTX *context) { * @param input block * @param length of input block */ -void MD5Update (MD5_CTX *context, unsigned char *input, +static void MD5Update (MD5_CTX *context, unsigned char *input, unsigned int inputLen) { unsigned int i, index, partLen; @@ -156,7 +156,7 @@ void MD5Update (MD5_CTX *context, unsigned char *input, * @param message digest * @param context */ -void MD5Final (unsigned char digest[16], MD5_CTX *context) { +static void MD5Final (unsigned char digest[16], MD5_CTX *context) { unsigned char bits[8]; unsigned int index, padLen; diff --git a/libwardrobe/src/md5.h b/libwardrobe/src/md5.h index 5499524..26909d2 100644 --- a/libwardrobe/src/md5.h +++ b/libwardrobe/src/md5.h @@ -1,5 +1,5 @@ /* -Copyright (c) 2008 Lars-Dominik Braun +Copyright (c) 2008-2009 Lars-Dominik Braun Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -23,3 +23,4 @@ THE SOFTWARE. #define WARDROBE_MD5_DIGEST_LEN 32 char *WardrobeMd5Calc (char *string); + |