mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-10 18:28:10 +09:00
Format _bin_to_base64().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@740 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
@@ -228,8 +228,9 @@ static int get_equals(char *string) {
|
||||
}
|
||||
|
||||
/* thanks sysk for debugging my mess :) */
|
||||
#define BITS(n) ((1<<n)-1)
|
||||
static void _bin_to_base64(unsigned char *dest, unsigned char source[3], int len){
|
||||
#define BITS(n) ((1 << (n)) - 1)
|
||||
static void _bin_to_base64(unsigned char *dest, unsigned char source[3],
|
||||
int len) {
|
||||
switch (len) {
|
||||
case 1:
|
||||
dest[0] = alphabet[(source[0] >> 2)];
|
||||
@@ -251,6 +252,7 @@ static void _bin_to_base64(unsigned char *dest, unsigned char source[3], int len
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Converts binary data to a base64 string
|
||||
* \returns the converted string
|
||||
* \internal
|
||||
|
||||
Reference in New Issue
Block a user