diff options
author | Michi Henning <michi@zeroc.com> | 2007-05-04 05:24:44 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2007-05-04 05:24:44 +0000 |
commit | df88a798fff56373464751cb95f0cb26e585ebc1 (patch) | |
tree | 99a83f212da9ca161a6ec408c895486bf71486d7 /cpp/src/IceUtil/Base64.cpp | |
parent | http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=2181 (diff) | |
download | ice-df88a798fff56373464751cb95f0cb26e585ebc1.tar.bz2 ice-df88a798fff56373464751cb95f0cb26e585ebc1.tar.xz ice-df88a798fff56373464751cb95f0cb26e585ebc1.zip |
Bug 1022.
Diffstat (limited to 'cpp/src/IceUtil/Base64.cpp')
-rw-r--r-- | cpp/src/IceUtil/Base64.cpp | 73 |
1 files changed, 36 insertions, 37 deletions
diff --git a/cpp/src/IceUtil/Base64.cpp b/cpp/src/IceUtil/Base64.cpp index 31c877862d8..dfc4e809268 100644 --- a/cpp/src/IceUtil/Base64.cpp +++ b/cpp/src/IceUtil/Base64.cpp @@ -183,6 +183,42 @@ IceUtil::Base64::decode(const string& str) return retval; } +bool +IceUtil::Base64::isBase64(char c) +{ + if(c >= 'A' && c <= 'Z') + { + return true; + } + + if(c >= 'a' && c <= 'z') + { + return true; + } + + if(c >= '0' && c <= '9') + { + return true; + } + + if(c == '+') + { + return true; + } + + if(c == '/') + { + return true; + } + + if(c == '=') + { + return true; + } + + return false; +} + char IceUtil::Base64::encode(unsigned char uc) { @@ -234,40 +270,3 @@ IceUtil::Base64::decode(char c) return 63; } - - -bool -IceUtil::Base64::isBase64(char c) -{ - if(c >= 'A' && c <= 'Z') - { - return true; - } - - if(c >= 'a' && c <= 'z') - { - return true; - } - - if(c >= '0' && c <= '9') - { - return true; - } - - if(c == '+') - { - return true; - } - - if(c == '/') - { - return true; - } - - if(c == '=') - { - return true; - } - - return false; -} |