- Timestamp:
- 2007-07-07T17:19:28Z (17 years ago)
- Branches:
- master
- Children:
- b9e4ab5
- Parents:
- f7b44f2
- Location:
- lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/base64.c
rf7b44f2 r3b6eadc 31 31 char *tobase64(const char *text) 32 32 { 33 return base64_encode( text, strlen(text));33 return base64_encode((const unsigned char *)text, strlen(text)); 34 34 } 35 35 36 char *base64_encode(const char *in, int len)36 char *base64_encode(const unsigned char *in, int len) 37 37 { 38 38 char *out; -
lib/base64.h
rf7b44f2 r3b6eadc 27 27 28 28 G_MODULE_EXPORT char *tobase64( const char *text ); 29 G_MODULE_EXPORT char *base64_encode( const char *in, int len );29 G_MODULE_EXPORT char *base64_encode( const unsigned char *in, int len ); 30 30 G_MODULE_EXPORT int base64_encode_real( const unsigned char *in, int inlen, unsigned char *out, const char *b64digits ); 31 31 G_MODULE_EXPORT char *frombase64( const char *in ); -
lib/rc4.c
rf7b44f2 r3b6eadc 122 122 */ 123 123 124 int rc4_encode( unsignedchar *clear, int clear_len, unsigned char **crypt, char *password )124 int rc4_encode( char *clear, int clear_len, unsigned char **crypt, char *password ) 125 125 { 126 126 struct rc4_state *st; … … 130 130 key_len = strlen( password ) + RC4_IV_LEN; 131 131 if( clear_len <= 0 ) 132 clear_len = strlen( (char*)clear );132 clear_len = strlen( clear ); 133 133 134 134 /* Prepare buffers and the key + IV */ … … 154 154 } 155 155 156 int rc4_decode( unsigned char *crypt, int crypt_len, unsignedchar **clear, char *password )156 int rc4_decode( unsigned char *crypt, int crypt_len, char **clear, char *password ) 157 157 { 158 158 struct rc4_state *st; … … 165 165 if( clear_len < 0 ) 166 166 { 167 *clear = (unsigned char*)g_strdup( "" );167 *clear = g_strdup( "" ); 168 168 return 0; 169 169 } -
lib/rc4.h
rf7b44f2 r3b6eadc 33 33 struct rc4_state *rc4_keymaker( unsigned char *key, int kl, int cycles ); 34 34 unsigned char rc4_getbyte( struct rc4_state *st ); 35 int rc4_encode( unsignedchar *clear, int clear_len, unsigned char **crypt, char *password );36 int rc4_decode( unsigned char *crypt, int crypt_len, unsignedchar **clear, char *password );35 int rc4_encode( char *clear, int clear_len, unsigned char **crypt, char *password ); 36 int rc4_decode( unsigned char *crypt, int crypt_len, char **clear, char *password );
Note: See TracChangeset
for help on using the changeset viewer.