diff options
Diffstat (limited to 'src/base64.cpp')
-rw-r--r-- | src/base64.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/base64.cpp b/src/base64.cpp index 73ec8f3..18a18e5 100644 --- a/src/base64.cpp +++ b/src/base64.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2007-2010 Xagasoft, All rights reserved. | 2 | * Copyright (C) 2007-2011 Xagasoft, All rights reserved. |
3 | * | 3 | * |
4 | * This file is part of the libbu++ library and is released under the | 4 | * This file is part of the libbu++ library and is released under the |
5 | * terms of the license contained in the file LICENSE. | 5 | * terms of the license contained in the file LICENSE. |
@@ -64,7 +64,7 @@ void Bu::Base64::start() | |||
64 | { | 64 | { |
65 | } | 65 | } |
66 | 66 | ||
67 | size_t Bu::Base64::stop() | 67 | Bu::size Bu::Base64::stop() |
68 | { | 68 | { |
69 | // if( eMode |= Encode ) | 69 | // if( eMode |= Encode ) |
70 | { | 70 | { |
@@ -89,11 +89,11 @@ size_t Bu::Base64::stop() | |||
89 | // } | 89 | // } |
90 | } | 90 | } |
91 | 91 | ||
92 | size_t Bu::Base64::read( void *pBuf, size_t nBytes ) | 92 | Bu::size Bu::Base64::read( void *pBuf, Bu::size nBytes ) |
93 | { | 93 | { |
94 | if( bEosIn == true && iRPos == iChars ) | 94 | if( bEosIn == true && iRPos == iChars ) |
95 | return 0; | 95 | return 0; |
96 | size_t sIn = 0; | 96 | Bu::size sIn = 0; |
97 | char buf[4]; | 97 | char buf[4]; |
98 | while( sIn < nBytes ) | 98 | while( sIn < nBytes ) |
99 | { | 99 | { |
@@ -153,11 +153,11 @@ size_t Bu::Base64::read( void *pBuf, size_t nBytes ) | |||
153 | return sIn; | 153 | return sIn; |
154 | } | 154 | } |
155 | 155 | ||
156 | size_t Bu::Base64::write( const void *pBuf, size_t nBytes ) | 156 | Bu::size Bu::Base64::write( const void *pBuf, Bu::size nBytes ) |
157 | { | 157 | { |
158 | size_t sOut = 0; | 158 | Bu::size sOut = 0; |
159 | char outBuf[4]; | 159 | char outBuf[4]; |
160 | for( size_t j = 0; j < nBytes; j++ ) | 160 | for( Bu::size j = 0; j < nBytes; j++ ) |
161 | { | 161 | { |
162 | iBuf |= (((uint8_t *)pBuf)[j])<<((2-iBPos++)*8); | 162 | iBuf |= (((uint8_t *)pBuf)[j])<<((2-iBPos++)*8); |
163 | if( iBPos == 3 ) | 163 | if( iBPos == 3 ) |