- Timestamp:
- 2014-11-24T05:16:09Z (10 years ago)
- Branches:
- master
- Children:
- 9f8bb17
- Parents:
- e2472dd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/yahoo/libyahoo2.c
re2472dd rb38d399 681 681 } 682 682 683 /* raw bytes in quasi-big-endian order to base 64 string (NUL-terminated)*/683 /* yahoo's variant of base64 */ 684 684 static void to_y64(unsigned char *out, const unsigned char *in, int inlen) 685 685 { 686 base64_encode_real(in, inlen, out, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-"); 686 char *encoded = base64_encode(in, inlen); 687 int i = 0; 688 689 do { 690 if (encoded[i] == '+') { 691 out[i] = '.'; 692 } else if (encoded[i] == '/') { 693 out[i] = '_'; 694 } else if (encoded[i] == '=') { 695 out[i] = '-'; 696 } else { 697 out[i] = encoded[i]; 698 } 699 } while (encoded[i++]); 700 701 g_free(encoded); 687 702 } 688 703
Note: See TracChangeset
for help on using the changeset viewer.