summaryrefslogtreecommitdiff
path: root/cpp/src/IceUtil/Base64.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceUtil/Base64.cpp')
-rw-r--r--cpp/src/IceUtil/Base64.cpp73
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;
-}